AOT compilation fail
naturalfreak opened this issue · 7 comments
naturalfreak commented
AOT compilation with uglify, npm run build-android-bundle --uglify.
ERROR in 0.js from UglifyJs
Unexpected token: name (SocketBase) [0.js:5094,6]
ERROR in 1.js from UglifyJs
Unexpected token: name (SocketBase) [1.js:4953,6]
ERROR in 2.js from UglifyJs
Unexpected token: name (SocketBase) [2.js:5076,6]
ERROR in 3.js from UglifyJs
Unexpected token: name (SocketBase) [3.js:4967,6]
ERROR in bundle.js from UglifyJs
Unexpected token: name (SocketBase) [bundle.js:10902,6]
tns version 3.1.2
package.json
node 7.10.1
npm 4.2.0
"dependencies": {
"@angular/animations": "~4.1.3",
"@angular/common": "~4.1.3",
"@angular/compiler": "~4.1.3",
"@angular/core": "~4.1.3",
"@angular/forms": "~4.1.3",
"@angular/http": "~4.1.3",
"@angular/platform-browser": "~4.1.3",
"@angular/router": "~4.1.3",
"nativescript-angular": "~3.1.2",
"nativescript-camera": "~3.0.1",
"nativescript-fresco": "~3.0.4",
"nativescript-geolocation": "~3.0.0",
"nativescript-google-maps-sdk": "~2.3.2",
"nativescript-imagepicker": "~3.0.2",
"nativescript-iqkeyboardmanager": "~1.1.0",
"nativescript-push-notifications": "~0.1.4",
"nativescript-socket.io": "~0.6.0",
"nativescript-telerik-ui-pro": "^3.0.1",
"nativescript-theme-core": "~1.0.4",
"reflect-metadata": "^0.1.10",
"rxjs": "~5.4.2",
"tns-core-modules": "^3.1.0",
"zone.js": "~0.8.12"
},
"devDependencies": {
"@angular/compiler-cli": "~4.1.3",
"@ngtools/webpack": "~1.4.2",
"babel-traverse": "6.24.1",
"babel-types": "6.24.1",
"babylon": "6.17.0",
"codelyzer": "^3.0.1",
"copy-webpack-plugin": "~4.0.1",
"extract-text-webpack-plugin": "~2.1.0",
"fs-extra": "^0.30.0",
"glob": "^7.1.2",
"lazy": "1.0.11",
"markdown-snippet-injector": "^0.2.0",
"nativescript-css-loader": "~0.26.1",
"nativescript-dev-typescript": "^0.5.0",
"nativescript-dev-webpack": "~0.7.3",
"opener": "^1.4.1",
"raw-loader": "~0.5.1",
"resolve-url-loader": "~2.0.2",
"rimraf": "^2.5.3",
"tar.gz": "^1.0.5",
"tns-platform-declarations": "^3.1.0",
"tslint": "^5.4.2",
"typescript": "~2.3.4",
"webpack": "~2.6.1",
"webpack-bundle-analyzer": "^2.8.2",
"webpack-sources": "~1.0.1"
}
naderio commented
@naturalfreak does removing platforms
and running again fixes this issue? if not, does reverting to v0.5.0 resolves the issue?
naturalfreak commented
No, same problem after removing platforms and reverting to v0.5.0.
naderio commented
ok, does it work without --uglify? (it should, works for me with similar setup)
naderio commented
@naturalfreak any update here?
thematan commented
It does work without uglify
naderio commented
ok, @naturalfreak @thematan
it appears that the issue is this plugin being compiled from TypeScript to ES2015, and that nativescript-dev-webpack
uses uglify-js
instead of uglify-es
rolling back compilation target to ES5
naderio commented
fixed in v0.7.1