-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
Implement import assertions #11917
Labels
Comments
I implemented the parser plugin in acorn for import assertions: https://github.com/xtuc/acorn-import-assertions |
xtuc
added a commit
to xtuc/webpack
that referenced
this issue
Dec 27, 2020
xtuc
added a commit
to xtuc/webpack
that referenced
this issue
Dec 27, 2020
xtuc
added a commit
to xtuc/webpack
that referenced
this issue
Dec 28, 2020
xtuc
added a commit
to xtuc/webpack
that referenced
this issue
Dec 28, 2020
xtuc
added a commit
to xtuc/webpack
that referenced
this issue
Dec 28, 2020
xtuc
added a commit
to xtuc/webpack
that referenced
this issue
Jan 24, 2021
xtuc
added a commit
to xtuc/webpack
that referenced
this issue
Jan 24, 2021
4 tasks
xtuc
added a commit
to xtuc/webpack
that referenced
this issue
Feb 21, 2021
xtuc
added a commit
to xtuc/webpack
that referenced
this issue
Mar 28, 2021
xtuc
added a commit
to xtuc/webpack
that referenced
this issue
Mar 28, 2021
xtuc
added a commit
to xtuc/webpack
that referenced
this issue
Mar 28, 2021
xtuc
added a commit
to xtuc/webpack
that referenced
this issue
Apr 3, 2021
xtuc
added a commit
to xtuc/webpack
that referenced
this issue
Apr 3, 2021
This issue had no activity for at least three months. It's subject to automatic issue closing if there is no activity in the next 15 days. |
bump |
Done #12278 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feature request
What is the expected behavior?
webpack can use https://github.com/tc39/proposal-import-assertions to enforce JavaScript module type at runtime or build time (like with JSON modules, presumably based on file extension).
What is motivation or use case for adding/changing the behavior?
For security reasons browser will use the syntax for some non JavaScript Module types. Even if webpack doesn't necessarily suffers from that concern, we should make it consistent with browsers.
It could help webpack's runtime when loading/parsing resource into JavaScript modules if the file extension isn't available on a file system or expose to loaders to run on a certain module types only.
How should this be implemented in your opinion?
Acorn needs to support the syntax
Are you willing to work on this yourself?
yes
The text was updated successfully, but these errors were encountered: