Skip to content

Commit 200646b

Browse files
authored
feat: add a warning that is output when a plugin sets esbuild related options (#21218)
1 parent 87dae32 commit 200646b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

packages/vite/src/node/config.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2542,6 +2542,18 @@ async function runConfigHook(
25422542
`\`rollupOptions\` specified by that plugin will be ignored.`,
25432543
)
25442544
}
2545+
if (res.esbuild) {
2546+
context.warn(
2547+
`\`esbuild\` option was specified by ${JSON.stringify(p.name)} plugin. ` +
2548+
`This option is deprecated, please use \`oxc\` instead.`,
2549+
)
2550+
}
2551+
if (res.optimizeDeps?.esbuildOptions) {
2552+
context.warn(
2553+
`\`optimizeDeps.esbuildOptions\` option was specified by ${JSON.stringify(p.name)} plugin. ` +
2554+
`This option is deprecated, please use \`optimizeDeps.rolldownOptions\` instead.`,
2555+
)
2556+
}
25452557
conf = mergeConfig(conf, res)
25462558
}
25472559
}

0 commit comments

Comments
 (0)