Skip to content

[Bug]: should not convert import assert to import with #9780

@SyMind

Description

@SyMind

System Info

Details

tests/webpack-test/configCases/externals/import-assertion

import * as staticPkg from "./static-package.json" assert { type: "json" };

Now will transform to:

import x from "./static-package.json" with { type: "json" };

Expected:

import x from "./static-package.json" assert { type: "json" };

View the SWC AST, the key information of "assert" or "with" has lost.

Reproduce link

No response

Reproduce Steps

Metadata

Metadata

Assignees

Labels

teamThe issue/pr is created by the member of Rspack.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions