Skip to content

Commit 3f05f0f

Browse files
committed
chore: update comment
1 parent 66adcf4 commit 3f05f0f

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

packages/vite/src/node/config.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,14 @@ export interface LegacyOptions {
567567
*/
568568
skipWebSocketTokenCheck?: boolean
569569
/**
570-
* TODO: write description
570+
* Opt-in to the pre-Vite 8 CJS interop behavior, which was inconsistent.
571+
*
572+
* In pre-Vite 8 versions, Vite had inconsistent CJS interop behavior. This was due to
573+
* the different behavior of esbuild and the Rollup commonjs plugin.
574+
* Vite 8+ uses Rolldown for both the dependency optimization in dev and the production build,
575+
* which aligns the behavior to esbuild.
576+
*
577+
* See the Vite 8 migration guide for more details.
571578
*/
572579
inconsistentCjsInterop?: boolean
573580
}

packages/vite/src/node/plugins/resolve.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ interface ResolvePluginOptions {
169169
idOnly?: boolean
170170

171171
/**
172-
* TODO: write description
172+
* Enable when `legacy.inconsistentCjsInterop` is true. See that option for more details.
173173
*/
174174
legacyInconsistentCjsInterop?: boolean
175175
}

0 commit comments

Comments
 (0)