-
Notifications
You must be signed in to change notification settings - Fork 32
Webpack uglify #10
Comments
Yep, same here. Can be fixed by replacing all |
The issue is that Uglify didn't support ES6. mishoo/UglifyJS#448 I'm not really keen on downgrading ES6 code to older ES5 code; seems like a big step backwards. |
I understand, no worries. @tushar-1health be welcome to use my fork of this nice plugin and switch back to this one whenever ES6 is supported. |
Yes, @EddyVerbruggen . I have solved this here: #12 |
Hey guys! I've been having this problem with several other plugins and I agree with @NathanaelA that downgrading the source code just for the sake of Uglify is not a good option. I ended up adding // Transpile ES6+ files
{
test: /\.js$/,
loader: "babel-loader",
include: [
resolve(__dirname, 'node_modules/nativescript-sms-inbox'),
resolve('nativescript-contacts-lite'),
],
query: {
presets: [
[
"es2015",
{
"targets": {
"uglify": false
}
}
]
]
}
} Hope this helps. |
@Guatom - Excellent solution, thanks for commenting. |
If you upgrade UglifyJS to version 3 ES6 is supported, see: NativeScript/nativescript-angular#1011 (the sis0k0 post). Worked for me to webpack/ugilfy a project with this plugin. |
This happens while using {N}-Vue's template https://github.com/nativescript-vue/vue-cli-template |
@rigoparis - Can you tell me which version of Webpack you are using; the uglify issue should have been fixed a while back by the NativeScript team when they started using v1.x of the uglify plugin. |
@NathanaelA I believe the {N}-Vue template has not yet been updated to a later version of Webpack. @rigoparis I've solved this temporarily using the quick solution in this comment—basically using |
@samtgarson - Sam thanks for the status update; I would have expected that Igor was using the latest version of the NS webpack in the Vue stuff... |
This should now be fixed; NS-Vue should be using the latest Webpack. 😀 |
Hello,
Webpack without uglify works fine. However, with --uglify flag it fails with following error.
The text was updated successfully, but these errors were encountered: