[babel 8] Fully remove import assertions#17603
Conversation
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/60220 |
|
commit: |
a32a0f9 to
b6ac077
Compare
| !pluginsMap.has("deprecatedImportAssert") && | ||
| if (pluginsMap.has("deprecatedImportAssert")) { | ||
| if (process.env.BABEL_8_BREAKING) { | ||
| console.warn( |
There was a problem hiding this comment.
Making this a warning and not an error to keep compatibility with Babel 7 @babel/preset-env.
|
Hello, @nicolo-ribaudo There is no way to parse "import assertions" now? Prettier remains supported for it because the code is runnable on Node.js 20. Maybe it's fine for us to drop support for it, but if there is still a plugin or options to support it, we'd like to avoid this change, just want to be sure. |
|
Yeah there is no way to support it in Babel now, as that proposed syntax does not exist anymore. I think Prettier should drop it, as Node.js 20 is the only remaining existing platform that supports them and it reports a warning when using it. If really needed, given that Prettier bundles Babel anyway we could figure out a way for you to support it with some build-time system. |
|
Thanks.
We are good. |
Fixes #1, Fixes #2Ref #17580 (comment)