Skip to content

Commit 24c0417

Browse files
committed
feat: warn when esbuild: false is set but oxc: false is not set
1 parent 5c52bbc commit 24c0417

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/vite/src/node/config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1698,6 +1698,14 @@ export async function resolveConfig(
16981698
} else {
16991699
oxc = convertEsbuildConfigToOxcConfig(config.esbuild, logger)
17001700
}
1701+
} else if (config.esbuild === false && config.oxc !== false) {
1702+
logger.warn(
1703+
colors.yellow(
1704+
`\`esbuild\` option is set to false, but \`oxc\` option was not set to false. ` +
1705+
`\`esbuild: false\` does not have effect any more. ` +
1706+
`If you want to disable the default transformation, which is now handled by Oxc, please set \`oxc: false\` instead.`,
1707+
),
1708+
)
17011709
}
17021710

17031711
resolved = {

0 commit comments

Comments
 (0)