You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 1, 2020. It is now read-only.
I'm getting an exception when creating Ionic builds with --prod flag, caused by uglifyjs.
What behavior are you expecting?
I expect that uglifyjs properly uglifies all my code and the build can be run successfully.
Steps to reproduce:
ionic cordova build ios --prod
[INFO] Running app-scripts build: --prod --platform ios --target cordova
[08:29:47] build prod started ...
[08:29:48] clean started ...
[08:29:48] clean finished in less than 1 ms
[08:29:48] copy started ...
[08:29:48] ngc started ...
[08:30:01] ngc finished in 13.09 s
[08:30:01] preprocess started ...
[08:30:01] deeplinks started ...
[08:30:02] deeplinks finished in 1.13 s
[08:30:02] optimization started ...
[08:30:06] copy finished in 18.64 s
[08:30:19] optimization finished in 16.99 s
[08:30:19] preprocess finished in 18.12 s
[08:30:19] webpack started ...
[08:31:30] webpack finished in 71.62 s
[08:31:30] sass started ...
[08:31:30] uglifyjs started ...
[08:31:32] sass finished in 1.46 s
[08:31:32] cleancss started ...
[08:31:33] cleancss finished in 1.14 s
Error: Uglify failed: Unexpected token operator «=», expected punc «,» in undefined at line undefined, col undefined, pos undefined
at new BuildError (/Users/user/Development/app/sources/node_modules/@ionic/app-scripts/dist/util/errors.js:16:28)
at taskReject (/Users/user/Development/app/sources/node_modules/@ionic/app-scripts/dist/worker-process.js:36:22)
at /Users/user/Development/app/sources/node_modules/@ionic/app-scripts/dist/worker-process.js:14:13
Which @ionic/app-scripts version are you using?
2.1.4
Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
I know that this has been an issue with older Ionic version already, where one could install "uglifyjs#harmony" to fix the issue within the app-scripts dependency. But this doesn't seem to work anymore. I've seen this issue in many places and quite often, hence that's something you should really have a look at.
The text was updated successfully, but these errors were encountered:
Thanks guys. @danbucholtz : Unfortunately not. Meanwhile (yesterday) I managed to fix the issue by updating the app-scripts to latest release 3.0.0. After updating the custom configs (webpack.config.js / copy.config.js) I could build the project without any issues, with and without the --prod flag.
As the issue is fixed for me, you may close the issue.
Short description of the problem:
I'm getting an exception when creating Ionic builds with --prod flag, caused by uglifyjs.
What behavior are you expecting?
I expect that uglifyjs properly uglifies all my code and the build can be run successfully.
Steps to reproduce:
Which @ionic/app-scripts version are you using?
2.1.4
Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
I know that this has been an issue with older Ionic version already, where one could install "uglifyjs#harmony" to fix the issue within the app-scripts dependency. But this doesn't seem to work anymore. I've seen this issue in many places and quite often, hence that's something you should really have a look at.
The text was updated successfully, but these errors were encountered: