Skip to content

Conversation

@sapphi-red
Copy link
Member

@sapphi-red sapphi-red commented Oct 24, 2025

Description

Adds legacy.inconsistentCjsInterop: true option to opt-in to the previous inconsistent behavior.

In normal Vite, Vite had inconsistent CJS interop behavior. This was due to the different behavior of esbuild and the Rollup commonjs plugin. rolldown-vite uses Rolldown for both the dependency optimization in dev and the production build, which aligns the behavior to esbuild.

requires rolldown/rolldown#6687
refs #444
fixes #457
fixes #458

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 26, 2025

Open in StackBlitz

npm i https://pkg.pr.new/vitejs/rolldown-vite/@vitejs/plugin-legacy@464
npm i https://pkg.pr.new/vitejs/rolldown-vite@464

commit: b5e5a67

@sapphi-red sapphi-red force-pushed the feat/add-legacy-inconsistent-cjs-interop branch from 3f05f0f to b5e5a67 Compare October 27, 2025 10:39
@sapphi-red sapphi-red marked this pull request as ready for review October 27, 2025 10:46
@sapphi-red sapphi-red merged commit 10aa992 into rolldown-vite Oct 27, 2025
41 of 42 checks passed
@sapphi-red sapphi-red deleted the feat/add-legacy-inconsistent-cjs-interop branch October 27, 2025 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue with ReactGA.initialize not being recognized in ROLLDOWN-VITE v7.1.19 Redux-persist no longer works in rolldown-vite 7.1.19

2 participants