We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
production
development
conditions
It would be nice if conditions always included development or production
E.g. vite build will automatically set the production condition while vite dev will automatically set the development condition
vite build
vite dev
References: https://vite.dev/config/shared-options#resolve-conditions https://vite.dev/guide/env-and-mode#node-env-and-modes
Libraries like Svelte rely on this to be set. This works automatically in Vite, but requires extra configuration in esbuild
If the user has not provided either production or development then set production by default or development if NODE_ENV === 'development'
NODE_ENV === 'development'
The text was updated successfully, but these errors were encountered:
esbuild doesn't check NODE_ENV in its Go code. It does set process.env.NODE_ENV = "production" when all minification options are enabled. Maybe the same logic can be applied to the conditions field.
NODE_ENV
process.env.NODE_ENV = "production"
Sorry, something went wrong.
That seems reasonable as conditions and NODE_ENV should always be in sync as it would cause confusion to have their values differ
No branches or pull requests
It would be nice if
conditions
always includeddevelopment
orproduction
E.g.
vite build
will automatically set theproduction
condition whilevite dev
will automatically set thedevelopment
conditionReferences:
https://vite.dev/config/shared-options#resolve-conditions
https://vite.dev/guide/env-and-mode#node-env-and-modes
Libraries like Svelte rely on this to be set. This works automatically in Vite, but requires extra configuration in esbuild
If the user has not provided either
production
ordevelopment
then setproduction
by default ordevelopment
ifNODE_ENV === 'development'
The text was updated successfully, but these errors were encountered: