File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -427,6 +427,15 @@ export async function resolveConfig(
427
427
}
428
428
}
429
429
430
+ if ( process . env . VITE_TEST_WITHOUT_PLUGIN_COMMONJS ) {
431
+ config = mergeConfig ( config , {
432
+ optimizeDeps : { disabled : false } ,
433
+ ssr : { optimizeDeps : { disabled : false } }
434
+ } )
435
+ config . build ??= { }
436
+ config . build . commonjsOptions = { include : [ ] }
437
+ }
438
+
430
439
// resolve root
431
440
const resolvedRoot = normalizePath (
432
441
config . root ? path . resolve ( config . root ) : process . cwd ( )
@@ -563,16 +572,6 @@ export async function resolveConfig(
563
572
564
573
const optimizeDeps = config . optimizeDeps || { }
565
574
566
- if ( process . env . VITE_TEST_WITHOUT_PLUGIN_COMMONJS ) {
567
- config . build ??= { }
568
- config . build . commonjsOptions = { include : [ ] }
569
- config . optimizeDeps ??= { }
570
- config . optimizeDeps . disabled = false
571
- config . ssr ??= { }
572
- config . ssr . optimizeDeps ??= { }
573
- config . ssr . optimizeDeps . disabled = false
574
- }
575
-
576
575
const BASE_URL = resolvedBase
577
576
578
577
const resolved : ResolvedConfig = {
You can’t perform that action at this time.
0 commit comments