rspack
rspack copied to clipboard
support import attributes
https://github.com/tc39/proposal-import-attributes
- webpack-tests/cases/json/import-assertions-type-json
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!
@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);
I think it was transformed by SWC, if I add the swc.jsc.experimental.keepImportAttributes: true option, I will get the parsing error:
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!
close since this seems solved