webpack-contrib/uglifyjs-webpack-plugin

Error: Unexpected token: name «t7ctx», expected: punc «;»

BananaAcid opened this issue · 4 comments

Got an error - thought it might be about ES6 (isn't it supported?):

ERROR in app.js from UglifyJs
Unexpected token: name «t7ctx», expected: punc «;» [./node_modules/template7/dist/template7.esm.js:16,4]

Line reads:

16: let t7ctx;
17: if (typeof window !== 'undefined') {
18:   t7ctx = window;
19: ...

so ,how to solve this problem?

Migrate on https://github.com/webpack-contrib/terser-webpack-plugin

so how to solve this problem?

That is how I solved it ... terser just works.

@EvalGitHub migrate on terser-webpack-plugin