Closed mhoofman closed 1 year ago
Seems like we wrote an object literal like { foo }
but should have written { foo: foo }
. @andrewbranch
Though, you must be using something truly ancient to not have that syntax... Webpack v2 I guess shows that just be the case. I'm surprised you don't see breaks somewhere else!
Per https://github.com/microsoft/tslib/pull/206#issuecomment-1557911549, this is exceptionally strange given export default
was introduced in the same ECMAScript revision as the object literal shorthand, so a tool not doing both is very, very odd.
should we work towards updating our package dependencies
Yes 😄
should we work towards updating our package dependencies
Yes 😄
Thanks for looking into this! I guess its time for us to move out of ancient history.
Note that there should be other workarounds available to you, like
tslib.js
instead of tslib.es6.js
tslib.es6.js
before Uglify sees itERROR in static/js/index.js from UglifyJs Unexpected token: punc (,) [./node_modules/_tslib@2.5.2@tslib/tslib.es6.js:296,0][static/js/index.js:140813,13]
I am running into this issue, but not related to UglifyJs, instead when trying to use webpack with typescript with an es5 target.
I have a minimum repro here: https://github.com/taurheim/webpack-typescript-es5-demo
@andrewbranch would appreciate your insights here, this might not be a tslib problem directly but it only broke with the new tslib version. Thanks!
This all seems like everyone else’s bugs, not ours, but I guess we can just delete the offending syntax 🥴
Our project's webpack build which uses UglifyJS (
uglify-js
) started erroring after thetslib
update from 2.5.0 to 2.5.1.Here is the error message we are seeing (I replaced the name of our bundle file w/ bundle.js):
Here are the package versions used that create this build error:
We rolled back
tslib
to version 2.5.0 to fix our builds.Can this older version of
uglify-js
be supported or should we work towards updating our package dependencies?