How to debug Angular in prod server?

后端 未结 4 1666
萌比男神i
萌比男神i 2020-12-28 15:08

In the development environment I can debug with the Chrome source tab , but in the prod server I use the dist folder content after running ng build --prod. This

4条回答
  •  我在风中等你
    2020-12-28 16:00

    In Angualr CLI 6 options seems to be changed as

    ng build --prod --source-map
    

    Or else you can enable source maps in angular.json by setting the sourceMap:true in production configurations

    "configurations": {
                "production": {
                  "optimization": true,
                  "outputHashing": "all",
                  **"sourceMap": false,**
                     --------
    

提交回复
热议问题