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
The current version (2.1.0) calls for terser^4.7.0, which on my machine gets resolved to [email protected]. This version of terser does not support the modern js optional chaining ?., thinking it is a syntax error. Here's a minimal example:
I see that the news commit calls out [email protected], however the optional chaining is also broken in that version too. However, [email protected] (newest as of post), does support. So providing the newest version of terser:
constminifyStream=require("minify-stream")({uglify:require("terser")});minifyStream.on("data",(d)=>console.log(d.toString()));minifyStream.write(`console.log({a:1}?.b);`);minifyStream.end();/**inline source map not foundconsole.log({a:1}?.b);//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJjb25zb2xlIiwibG9nIiwiYSIsImIiXSwic291cmNlcyI6WyIwIl0sIm1hcHBpbmdzIjoiQUFBQUEsUUFBUUMsSUFBSSxDQUFDQyxFQUFFLElBQUlDIn0= */
Doesn't throw the error, but does seem to have an issue with the source maps.
The current version (2.1.0) calls for terser^4.7.0, which on my machine gets resolved to [email protected]. This version of terser does not support the modern js optional chaining
?.
, thinking it is a syntax error. Here's a minimal example:I see that the news commit calls out [email protected], however the optional chaining is also broken in that version too. However, [email protected] (newest as of post), does support. So providing the newest version of terser:
Doesn't throw the error, but does seem to have an issue with the source maps.
Can we bump the version of terser?
(See this issue for background)
The text was updated successfully, but these errors were encountered: