Cannot build project with --env.uglify if this plugin is included
Closed this issue · 2 comments
Burgov commented
When I try to build the project with this plugin included, I get the following error:
ERROR in bundle.js from UglifyJs
Unexpected token name «s», expected punc «;» [bundle.js:88919,13]
I traced it back to the following piece of code:
global.__assign =
(this && this.__assign) ||
Object.assign ||
function(t) {
for (let s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i]
for (const p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]
}
return t
}
(it complains about the line starting with for (let s
). Any ideas?
SBats commented
Hi,
I think it might be linked to the version of UglifyJS you use (v2 vs v3).
Could you give a look at the following comment and follow its recommendation, then tell us if it's better?
NativeScript/nativescript-angular#1011 (comment)
Burgov commented
yep, thanks!