Skip to content

How to set Modern.js Builder mode? #4936

Answered by chenjiahan
Lzzzs asked this question in Q&A
Discussion options

You must be logged in to vote

我看了下是 Builder CLI 的 bug,没有在一开始就设置 NODE_ENV,所以你的 config 文件里没有拿到正确的 NODE_ENV 值。

你可以先手动处理一下哈,执行 NODE_ENV=production builder build 应该就可以。

我们会在 Rsbuild 里尽快修复这个问题,Rsbuild 是 Modern.js Builder 的新版本,参考 https://github.com/web-infra-dev/rsbuild

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
3 replies
@Lzzzs
Comment options

@chenjiahan
Comment options

Answer selected by chenjiahan
@chenjiahan
Comment options

Comment options

You must be logged in to vote
4 replies
@chenjiahan
Comment options

@chenjiahan
Comment options

@Lzzzs
Comment options

@chenjiahan
Comment options

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