System Info
System: Windows 11 22631 x64
Details
See the reproducible example repo;
on rspack@1.7.11 it succeeds, but on rspack@2.0.4 it fails with
ESModulesLinkingError: export 'default' (imported as 'dayjs') was not found in 'dayjs' (module has no exports)
Note: ignore the repo name; the main branch was for a previous bug
Reproduce link
https://github.com/Agritite/rspack-10456-repro/tree/no-exports
Reproduce Steps
pnpm run build
- see error
- downgrade rspack to 1.7.11 i.e.
pnpm remove @rspack/cli @rspack/core
pnpm add -D @rspack/cli@^1 @rspack/core@^1
pnpm run build
- succeeds
Note: you can also change the target to node24.15 or electron41.6-renderer; both also makes rspack@2 succeed
i.e. only when target: "web" + rspack@2 = ESModulesLinkingError
System Info
System: Windows 11 22631 x64
Details
See the reproducible example repo;
on rspack@1.7.11 it succeeds, but on rspack@2.0.4 it fails with
Note: ignore the repo name; the
mainbranch was for a previous bugReproduce link
https://github.com/Agritite/rspack-10456-repro/tree/no-exports
Reproduce Steps
pnpm run buildpnpm run buildNote: you can also change the target to
node24.15orelectron41.6-renderer; both also makesrspack@2succeedi.e. only when
target: "web"+rspack@2= ESModulesLinkingError