You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 26, 2019. It is now read-only.
This recent PR—specifically, the change to the uglify options—causes errors in older browsers (namely IE11) in certain situations.
For example, if uglify (with its config on ecma: 8) receives an object like:
{ foo: foo, bar: bar, baz: baz }
it will convert the object to:
{ foo, bar, baz }
causing a syntax error Expected ':'.
NOTE: this happens most reliably with the window object as uglify won't mangle its name.
Currently, we are getting around this issue with a webpack override that changes the ecma setting to 5 rather than 8, but as I suspect others might have this issue as well, a formal option might be nice.
Alternatively, I think there is room to discuss whether transpiling code is beyond the responsibility of an uglifier. Especially if an explicit target is set in the tsconfig (we target our compiled typescript to es5, and would prefer if the uglifier respected that).
Thanks for all the hard work! I'm very grateful to be able to use typescript and create-react-app together.
The text was updated successfully, but these errors were encountered:
Also, I've found an error with compiling unicode symbols that occurs when building the app.
For example, in dev mode we have "\u00df", but compiled bundle in production looks like "\u{00df}" (with curly braces), which causes IE11 to throw an error.
This recent PR—specifically, the change to the uglify options—causes errors in older browsers (namely IE11) in certain situations.
For example, if uglify (with its config on
ecma: 8
) receives an object like:it will convert the object to:
causing a syntax error
Expected ':'
.Currently, we are getting around this issue with a webpack override that changes the
ecma
setting to5
rather than8
, but as I suspect others might have this issue as well, a formal option might be nice.Alternatively, I think there is room to discuss whether transpiling code is beyond the responsibility of an uglifier. Especially if an explicit target is set in the tsconfig (we target our compiled typescript to es5, and would prefer if the uglifier respected that).
Thanks for all the hard work! I'm very grateful to be able to use typescript and create-react-app together.
The text was updated successfully, but these errors were encountered: