You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the issue is related to 1.x -> 2.0 upgrade, read the Migration Guide first.
Describe the bug
Plugins don't have the process.env.NODE_ENV variable set to production when building for production.
I came across this when my tailwindcss build was suddenly huge, since the purge plugin relies on process.env.NODE_ENV being set to production, whereas it was development since Vite 2.
Describe the bug
Plugins don't have the
process.env.NODE_ENV
variable set toproduction
when building for production.I came across this when my tailwindcss build was suddenly huge, since the purge plugin relies on
process.env.NODE_ENV
being set toproduction
, whereas it wasdevelopment
since Vite 2.Reproduction
yarn && yarn build
development
in the logsThe only change I made w.r.t. the default template is adding a plugin:
https://github.com/RobbinBaauw/vite-process-repro/blob/1ef30c9230c79f43e7b69f2e95f6294e1aab9e26/vite.config.js#L6-L14
You'll also see logs of
undefined
, I'm not sure if that's an issue as well.System Info
vite
version:2.0.0-beta.12
node 12.18.1
yarn 1.22.4
The text was updated successfully, but these errors were encountered: