Configure vite legacy target #341
IlyaSemenov
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, nuxt-bridge injects
@vitejs/legacy-plugin
without passing it any options:bridge/src/vite/client.ts
Line 43 in 38036c5
defaults
(whatever it be).That is incompatible with Nuxt webpack bundler which explicitly sets
{ ie: 9 }
as babel target:https://github.com/nuxt/nuxt.js/blob/777a4b7f5033c86c37cbd93008f3ca792e4af8bc/packages/babel-preset-app/src/index.js#L96
I propose to use
{ targets: ['IE 9'] }
by default in Vite to keep that behaviour in sync, and also add an option to nuxt config (such asvite.legacy
) that will allow user to configure@vitejs/legacy-plugin
without using hacks such as I described in #340.Beta Was this translation helpful? Give feedback.
All reactions