8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8013a66 commit 19e8c68Copy full SHA for 19e8c68
packages/vite/src/node/config.ts
@@ -457,7 +457,12 @@ export async function resolveConfig(
457
const userPlugins = [...prePlugins, ...normalPlugins, ...postPlugins]
458
config = await runConfigHook(config, userPlugins, configEnv)
459
460
- if (process.env.VITE_TEST_WITHOUT_PLUGIN_COMMONJS) {
+ // If there are custom commonjsOptions, don't force optimized deps for this test
461
+ // even if the env var is set as it would interfere with the playground specs.
462
+ if (
463
+ !config.build?.commonjsOptions &&
464
+ process.env.VITE_TEST_WITHOUT_PLUGIN_COMMONJS
465
+ ) {
466
config = mergeConfig(config, {
467
optimizeDeps: { disabled: false },
468
ssr: { optimizeDeps: { disabled: false } },
0 commit comments