I am developing web components.
uglify-js 3.6.0
dateRange.js
const template = document.createElement("template");
template.innerHTML = `
<style>
</style>
<div class='dateRange'>
</div>
`;
uglifyjs dateRange.js -c -m -o dateRange.min.js
Parse error at dateRange.js:1,1
const template = document.createElement("template");
^
ERROR: Unexpected token: keyword «const»
at JS_Parse_Error.get (eval at
at fatal (C:UsersMichelAppDataRoamingnpmnode_modulesuglify-jsbinuglifyjs:298:27)
at run (C:UsersMichelAppDataRoamingnpmnode_modulesuglify-jsbinuglifyjs:241:9)
at Object.
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
uglify-js supports JavaScript, not ES6 − please use var instead.
Ok, thanks!
Will switch to terser.
On Mon, Apr 6, 2020 at 2:01 PM Alex Lam S.L. notifications@github.com
wrote:
uglify-js supports JavaScript, not ES6 − please use var instead.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/mishoo/UglifyJS2/issues/3764#issuecomment-609948374,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFCG6G2LAXAA4V6RYZPZKMDRLIKIRANCNFSM4MCKKIDQ
.
Most helpful comment
Ok, thanks!
Will switch to terser.
On Mon, Apr 6, 2020 at 2:01 PM Alex Lam S.L. notifications@github.com
wrote: