vite-plugin incorrectly relies on vite mode #17267
Labels
area/cli
bug/1-hard-to-reproduce
A reproduction is available, but it's hard to reproduce, so it has a lower priority.
bug/1-repro-available
A reproduction is available and needs to be confirmed.
flavour/vite-plugin
Bugs related to Vite usage with Quasar
kind/bug 🐞
Qv2 🔝
Quasar v2 issues
What happened?
vite build --mode qa
(or any other mode except 'production') produces a bundle with development import of quasar.What did you expect to happen?
Only
vite
command is used for development and runningvite build
command should produce production bundle for any mode:Reproduction URL
https://github.com/yurks/quasar-vite-issue
How to reproduce?
yarn build
to check correct production buildyarn build:qa
to check incorrect production qa buildFlavour
Vite Plugin (@quasar/vite-plugin)
Areas
Quasar CLI Commands/Configuration (@quasar/cli | @quasar/app-webpack | @quasar/app-vite)
Platforms/Browsers
No response
Quasar info output
No response
Relevant log output
No response
Additional context
Vite modes is a bit tricky and it's not always obvious that
production
mode is not the same withNODE_ENV=production
. That means we can run vite build with different modes, but suppose to have production build as a result.Quasars
vite-plugin
relies on vite mode here and here which makes impossible to have production build withvite build --mode qa
, for example. It would be more correct to rely onbuild
value of vite env config command property.The text was updated successfully, but these errors were encountered: