-
-
Notifications
You must be signed in to change notification settings - Fork 64
Description
Version
System:
OS: macOS 15.5
CPU: (10) arm64 Apple M1 Max
Memory: 574.64 MB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.12.0 - ~/.nvm/versions/node/v22.12.0/bin/node
Yarn: 1.22.22 - ~/.nvm/versions/node/v22.12.0/bin/yarn
npm: 10.9.0 - ~/.nvm/versions/node/v22.12.0/bin/npm
bun: 1.2.10 - ~/.nvm/versions/node/v20.10.0/bin/bun
Browsers:
Chrome: 137.0.7151.105
Edge: 137.0.3296.83
Safari: 18.5
npmPackages
@rslib/core: 0.10.1
@rsbuild/core: 1.4.0-beta.4
@rspack/core: 1.4.0-beta.1Details
Import json is transformed to js, but the import statement import attributes (with { type: 'json' }) are not removed.
import enUS from './en-US/translation.json' with { type: 'json' }; becoming import translation from './en-US/translation.js' with { type: 'json' };
Reproduce link
Reproduce Steps
Import a json file, e.g. import enUS from './en-US/translation.json' with { type: 'json' };. Build the library and see it being transformed into import translation from './en-US/translation.js' with { type: 'json' };, which is invalid
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels