【问题标题】:ng build --prod fails when sourceMap is true in angular.json当 angular.json 中的 sourceMap 为真时,ng build --prod 失败
【发布时间】:2019-05-08 18:40:58
【问题描述】:

我正在使用 angular 6 和 angular-cli 版本 6.2.7。

当我使用 ng build --prod 和 sourceMap: false 在 angular.json 配置中执行生产构建时,没有问题。但是当我使用 sourceMap: true 我得到这个错误

这是我的其他详细信息

【问题讨论】:

    标签: angular angular6 angular-cli


    【解决方案1】:

    作为一种解决方法,您可以尝试指定 max_old_space_size 设置(以 MB 为单位)

    node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng build --prod

    【讨论】:

      猜你喜欢
      • 2019-11-05
      • 1970-01-01
      • 2019-12-29
      • 1970-01-01
      • 2019-01-28
      • 2017-08-19
      • 2018-08-08
      • 2017-12-30
      • 2017-03-14
      相关资源
      最近更新 更多