Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new dynamic import(path, {}) with options fail with [JSC_PARSE_ERROR] Parse error #4189

Open
Nashorn opened this issue Aug 20, 2024 · 0 comments

Comments

@Nashorn
Copy link

Nashorn commented Aug 20, 2024

Closure compiler fails when it encounters any code that uses the new dynamic import() with options. Example code snippet that will break CC:

var _module = await import(cssPath, { with: { type: "css" } });

This throws a CC error:
ERROR - [JSC_PARSE_ERROR] Parse error. ')' expected 839| var _module = await import(cssPath, {

I understand the work around, but want to know when this will be supported OR is there any flags i can pass to bypass CC having to read/parse my code?

Using version:
closure-compiler-v20240317.jar with

ECMASCRIPT_2020 input/output and WHITESPACE_ONLY

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant