0

我开发了一个包含大量页面和组件的 PWA。

当我这样做时ionic build --prod,离子开始构建,在演出后卡住copy finished

我如何构建用于生产的 PWA?

4

1 回答 1

0

通过更改 package.json 解决

  "config": {
    "ionic_source_map": "source-map",
    "ionic_source_map_type": "cheap-source-map"
  },

 "scripts": {
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "lint": "ionic-app-scripts lint",
    "ionic:build": "node --max-old-space-size=4096 ./node_modules/@ionic/app-scripts/bin/ionic-app-scripts.js build",
    "ionic:serve": "ionic-app-scripts serve"
  },

观察:在配置中,真正重要的是“离子:构建”

于 2018-07-12T12:02:00.803 回答