feat: add vitePluginsBefore option#2170
Conversation
✅ Deploy Preview for creative-fairy-df92c4 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
this allows plugins like @tanstack/router-plugin to be added before the react plugin to work correctly
vitePluginsBefore option
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2170 +/- ##
==========================================
- Coverage 76.58% 76.42% -0.17%
==========================================
Files 115 115
Lines 3079 3079
Branches 698 698
==========================================
- Hits 2358 2353 -5
- Misses 637 641 +4
- Partials 84 85 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actually, one small change, make vite a peer dependency. The next major version of WXT will be doing the same.
This is also why the PR checks are failing - you're importing from a dev dependency, which means tsdown doesn't know if the import should be inlined or not. Moving Vite to peerDependencies resolves this because it informs tsdown that vite will be externalized.
@wxt-dev/analytics
@wxt-dev/auto-icons
@wxt-dev/browser
@wxt-dev/i18n
@wxt-dev/is-background
@wxt-dev/module-react
@wxt-dev/module-solid
@wxt-dev/module-svelte
@wxt-dev/module-vue
@wxt-dev/runner
@wxt-dev/storage
@wxt-dev/unocss
@wxt-dev/webextension-polyfill
wxt
commit: |
|
Thanks for helping make WXT better! |
this allows plugins like
@tanstack/router-pluginto be added before the react plugin to work correctlyOverview
When using e.g.
pnpm installtogether withwxtand@tanstack/router-pluginI got the following error:To fix this issue, the easiest solution was to add a
vitePluginsBeforefield and add the plugin there.Manual Testing
Add the plugin to
vitePluginsBeforeand see no error raised.Related Issue
This PR closes #<issue_number>