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
Dynamic Imports: import() must produce a SyntaxError #5270
Comments
This already appears to produce a SyntaxError. // test.js
import();
print("This can't happen."); Output
|
Ok, I've narrowed it down further... this only happens when the
There's no output at all for |
I see no change if I rename my test file to I think I see the problem though: WScript.LoadScriptFile('module.mjs', 'module'); // execute root module And then run the shim. No idea why you get no output in that case though, that's kind of weird. |
Lol, I just came back to post this same update. Thanks for preemptively confirming :D |
-ESModule isn't a flag that does anything in master. -ESDynamicImport is the flag to enable import() - without it any dynamic import is a syntax error |
@rhuanjl Right, this issue was specifically about |
While writing Test262 tests for dynamic import, I discovered the following incompatibility:
Should produce a SyntaxError, given the grammar:
import (
AssignmentExpression)
Does not expand to
import()
The text was updated successfully, but these errors were encountered: