我正在更新 package.json 中的脚本,该脚本使用“./node_modules”来使用 NPX 命令,并遇到了带有“max-old-space-size”参数的 ng build。我已将命令转换为以下
node --max-old-space-size=10240 ./node_modules/@angular/cli/bin/ng build --prod
到
npx --max-old-space-size=10240 ng build --prod
我有两个问题:
这不起作用,你应该在 --node-options 中包含节点参数。
npx --node-options='--max-old-space-size=10240' ng build --prod