Skip to content

feat: add turbopack support to optimize-locales - #10462

Open
stefanprobst wants to merge 1 commit into
adobe:mainfrom
stefanprobst:feat/turbopack-locales-plugin
Open

feat: add turbopack support to optimize-locales#10462
stefanprobst wants to merge 1 commit into
adobe:mainfrom
stefanprobst:feat/turbopack-locales-plugin

Conversation

@stefanprobst

Copy link
Copy Markdown
Contributor

currently the @react-aria/optimize-locales-plugin does not support turbopack, because turbopack has no full plugin api and no unplugin integration. but turbopack does support loaders, so this pull request adds basically a null-loader for unused locales/messages.

see #8897

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices
  • I understand every change in this PR and can explain why it's there.
  • If AI-assisted, I followed our AI contribution guidance and pointed my assistant at CLAUDE.md.

📝 Test Instructions:

you can run the github action at https://github.com/stefanprobst/react-aria-optimize-locales-turbopack-repro/actions/workflows/e2e.yml and point it to this branch. it will build two minimal next.js apps, one with this turbopack loader enabled, and one without, and then check whether unused message strings have been excluded.

see this run: https://github.com/stefanprobst/react-aria-optimize-locales-turbopack-repro/actions/runs/31874407939/job/94987870478#step:5:128

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant