google / google/closure-compiler
new dynamic import(path, {}) with options fail with [JSC_PARSE_ERROR] Parse error
Open
- Dominant language
- JavaScript
- Stars
- 7.7k
- Forks
- 1.2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 6
Description
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
Contributor guide
Assessment
This issue has not been assessed yet.