rspack如何自定义.env.[mode]呢? #8811
-
"build:qa": "rspack build --env-mode qa" 我的.env.qa文件 npm run build:qa
无法识别这些选项:env-mode, envMode |
Beta Was this translation helpful? Give feedback.
Answered by
chenjiahan
Dec 24, 2024
Replies: 2 comments 3 replies
-
You can refer to the implementation of Rsbuild. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Use this plugin: https://github.com/mrsteele/dotenv-webpack |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try to disable the default
optimization.nodeEnv
:https://rspack.dev/config/optimization#optimizationnodeenv