Skip to content
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 import attributes #4358

Open
Tracked by #4327
ahabhgk opened this issue Oct 18, 2023 · 4 comments
Open
Tracked by #4327

support import attributes #4358

ahabhgk opened this issue Oct 18, 2023 · 4 comments
Labels
stale team The issue/pr is created by the member of Rspack.

Comments

@ahabhgk
Copy link
Collaborator

ahabhgk commented Oct 18, 2023

https://github.com/tc39/proposal-import-attributes

  • webpack-tests/cases/json/import-assertions-type-json
@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Oct 18, 2023
@chenjiahan
Copy link
Member

@ahabhgk what's the current status of this issue?

I tried the following code in Rspack and it works:

import test from "./foo.json" with { type: "json" };

console.log(test);

@stale stale bot removed the stale label Apr 23, 2024
@chenjiahan
Copy link
Member

I think it was transformed by SWC, if I add the swc.jsc.experimental.keepImportAttributes: true option, I will get the parsing error:

image

Copy link

stale bot commented Jun 22, 2024

This issue has been automatically marked as stale because it has not had recent activity. If this issue is still affecting you, please leave any comment (for example, "bump"). We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

@stale stale bot added the stale label Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale team The issue/pr is created by the member of Rspack.
Projects
None yet
Development

No branches or pull requests

2 participants