This repository was archived by the owner on May 1, 2020. It is now read-only.
This repository was archived by the owner on May 1, 2020. It is now read-only.
2.0.1 --minifyjs
fails during gulp build #1102
Open
Description
Note: for support questions, please use one of these channels:
https://forum.ionicframework.com/
http://ionicworldwide.herokuapp.com/
Short description of the problem:
When building the project with the --minifyjs
argument, we get the following error:
...
[16:21:57] webpack finished in 31.14 s
[16:21:57] sass started ...
[16:21:57] uglifyjs started ...
[16:21:58] copy finished in 45.19 s
[16:21:59] sass finished in 1.55 s
[16:21:59] cleancss started ...
[16:22:00] cleancss finished in 1.32 s
[WARN] Error occurred during command execution from a CLI plugin
(@ionic/cli-plugin-cordova). Your plugins may be out of date.
Error: Uglify failed: Unexpected token: keyword (const) in undefined at line undefined, col undefined, pos undefined
Removing it will give a successful build, but the file size is increased by several MB.
We've seen this error since upgrading to 2.0.0, and we're still seeing it in 2.0.1
What behavior are you expecting?
To minify the code, giving the same result as v1.1.4. We we're able to use --prod
before upgrading to Ionic 3, now --prod
gives an ocean of errors.
Steps to reproduce:
- Run
ionic cordova run android --aot --minifyjs --minifycss --device
- We've also tested
ionic cordova run android --minifyjs
- ...or iOS
ionic cordova build ios --aot --minifyjs --minifycss
global packages:
@ionic/cli-plugin-proxy : 1.3.1
@ionic/cli-plugin-proxy : 1.3.1
@ionic/cli-utils : 1.4.0
Cordova CLI : not installed
Ionic CLI : 3.4.0
local packages:
@ionic/app-scripts : 2.0.1
@ionic/cli-plugin-cordova : 1.4.0
@ionic/cli-plugin-ionic-angular : 1.3.1
Cordova Platforms : none
Ionic Framework : ionic-angular 3.5.0
System:
Node : v8.1.2
OS : macOS Sierra
Xcode : Xcode 8.3.3 Build version 8E3004b
ios-deploy : 1.9.1
ios-sim : 5.0.13
npm : 5.0.3
Which @ionic/app-scripts version are you using?
2.0.1
Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)