“Unexpected token: punc ())” when building for production

后端 未结 4 1650
再見小時候
再見小時候 2020-12-29 06:14

If I try to test-build my application with ng build --prod --aot I get the following, quite short, error message:

$ ng build --prod
                      


        
4条回答
  •  时光取名叫无心
    2020-12-29 07:20

    In my case it was a leftover comma at the end of a list of functions inside a custom .js file in \src directory.

    The tip of by --source-map=true and also setting --build-optimizer=false in angular.json helped me a lot.

提交回复
热议问题