Skip to content

Unexpected token with process.env.NODE_ENV when using vite as bundler #143

Answered by meteorlxy
yzx9 asked this question in Q&A
Discussion options

You must be logged in to vote

It's a known "issue" of vite. All defined variables will be statically replaced during build.

FYI: https://vitejs.dev/guide/env-and-mode.html

If you are insterested, try using bundler-vite to build the official docs, which will fail...:sweat_smile:

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@yzx9
Comment options

@meteorlxy
Comment options

Answer selected by yzx9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants