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
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
Describe the bug
When I write the following code in the code
Then define
process.env.NODE_ENV
invite.config.ts
:Then I execute the following command for development
It turned out that after the vite compilation, it became
So I repeatedly made debug and found that, vite was forcibly replaced with
process.env.NODE_ENV
with vitemode
optionPosition to code: https://github.com/vitejs/vite/blob/main/packages/vite/src/node/plugins/clientInjections.ts#L56-L59
It can be seen that vite is directly replaced by
process.env.NODE_ENV
in the code tomode
optionI hope not to link the
mode
option andprocess.env.NODE_ENV
The two of them are two different things, let alone the code of the direct replace user
Reproduction
https://stackblitz.com/edit/vitejs-vite-qfdg3v?file=main.js,package-lock.json&terminal=dev
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: