google / closure-compiler

A JavaScript checker and optimizer.
https://developers.google.com/closure/compiler/
Apache License 2.0
7.41k stars 1.15k forks source link

Parse Error for "export * as X from ..." #4177

Open thheller opened 4 months ago

thheller commented 4 months ago

test.js

export * as boom from "./a.js";

running npx google-closure-compiler --js test.js (Version 20240317.0.0) leads to

test.js:1:9: ERROR - [JSC_PARSE_ERROR] Parse error. 'from' expected
  1| export * as boom from "./a.js";
              ^

1 error(s), 0 warning(s)

I didn't know this existed, but apparently some npm packages use it and it breaks compilation with shadow-cljs, see https://github.com/thheller/shadow-cljs/issues/1190.