Closed jakebailey closed 1 year ago
Object literal shorthand properties are in the same language spec as export default
, so I would be 100% ok with not taking this “fix,” but I won’t fight against it if others think it’s worth it. Presumably a (super old?) version of Uglify was seeing a source string that already had module syntax transformed down or away, but still had other ES2015+ syntax in it. Not a big fan of avoiding ES6 syntax in a file that literally has ES6 in the name and isn’t the default entrypoint.
super old?
Uh, yeah
- webpack 2.7.0
- uglify-js 2.8.29
Object literal shorthand properties are in the same language spec as
export default
TIL! I thought it came separately.
My bad, I forgot you had already opened this PR when I merged #216
Fixes #205
The default export is an expression, so the
{ ... }
is actually an object literal (not export names); as such, older runtimes may not support the shorthand object literal syntax. Duplicate the names to keep it working.