-
-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in Webpack + Uglification #1011
Comments
Have you tried without --snapshot ? Recently I was blaming the Uglification but in fact was the snapshot or both. |
Yes, same error. |
I was with a similar error but the variable is "position":
And the problem was in the plugin nativescript-toasts. I changed the variable Try look in your project for variable |
@cmargulhano can you provide the content of your |
Thank you for help me! { |
@cmargulhano @ferpaganucci ,
// webpack.config.js
const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
// ...
function getPlugins() {
// line 209
if (env.uglify) {
plugins.push(new webpack.LoaderOptionsPlugin({ minimize: true }));
plugins.push(new UglifyJsPlugin({
uglifyOptions: {
mangle: { reserved: [ nsWebpack.uglifyMangleExcludes ]},
compress: true
}
}));
}
} |
That's works! |
After Uglify now I'm getting this error: 10-05 16:48:53.260 16384 16384 F art : art/runtime/java_vm_ext.cc:470] from java.lang.Object com.tns.Runtime.callJSMethodNative(int, int, java.lang.String, int, boolean, java.lang.Object[]) |
@sis0k0 I tried the latest UglifyJsPlugin but it gives me the error below. Any thoughts on this,
|
Sorry, my bad. I missed to update the UglifyJsPlugin constructor options. |
Did we ever find a proper fix for this? It's a nativescript core issue, that seems obvious since I've got the same problem on NS-VUE. Went through NS plugins and manually changed _let_s to _var_s. Not looking forward to doing this with each rebuild. |
@spirit-of-satoshi It's not an issue with NativeScript, you may call it a issue with the plugin you use or UglifyJS. |
After run this: tns build android --clean && npm run start-android-bundle --uglify --snapshot
I got this error after running uglification:
ERROR in bundle.js from UglifyJs
Unexpected token: name (window) [bundle.js:29157,4]
The text was updated successfully, but these errors were encountered: