tc39/proposal-import-attributes

how to use this feature in browser without polyfil?

dante01yoon opened this issue · 5 comments

Greetings. I want to test this proposal in browser.
Is there any way I can test this without polyfill?

Is there a polyfill??? I thought there is no way to change syntax with just polyfills. It should be some preprocessing step done with webpack or other bundlers

Yeah I mean polyfill or any transforming like babel

You can test it in Safari 17.2, or in Chrome with the --harmony-import-attributes flag.

Chrome 123 (canary) allows you to use it without the flag!

https://chromestatus.com/feature/5205869105250304

@dante01yoon you can't use this feature without native syntax support, unless you're using a bundler such that you're not actually using native ESM in a browser.