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
Support new import attributes "with" syntax. #1529
Comments
Also possibly related bug at acornjs/acorn#1289. |
What should be the output for people who wrote |
This is why I should always wait for stage 4 :) |
Whatever happens today? I don't think the feature request here to support
Personal opinion is that a minifier should not make |
You are correct that the minifier shouldn't convert between them, at least in theory. I'll wait for Stage 4 to implement, otherwise I might have to support 3 different versions of the feature. |
The new
with
syntax will soon be required by Chromium (and other Chromium based browsers), and the oldassert
syntax will no longer work (see https://chromium-review.googlesource.com/c/v8/v8/+/5512879).Also see [1], [2] for the status of the "import attributes" feature. The older syntax had been implemented at #1095, and it seems that some similar updates are needed to support the new syntax.
[1] https://caniuse.com/mdn-javascript_statements_import_import_attributes
[2] https://chromestatus.com/feature/5205869105250304
Bug report or Feature request?
Bug.
Version (complete output of
terser -V
or specific git commit)5.31.0
Complete CLI command or
minify()
options usedterser
inputterser
output or errorExpected result
Should not crash.
The text was updated successfully, but these errors were encountered: