We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cbefc63 commit 7257fd8Copy full SHA for 7257fd8
packages/vite/src/node/optimizer/index.ts
@@ -554,10 +554,7 @@ export async function runOptimizeDeps(
554
// We can't use platform 'neutral', as esbuild has custom handling
555
// when the platform is 'node' or 'browser' that can't be emulated
556
// by using mainFields and conditions
557
- platform:
558
- config.build.ssr && config.ssr?.target !== 'webworker'
559
- ? 'node'
560
- : 'browser',
+ platform: ssr && config.ssr?.target !== 'webworker' ? 'node' : 'browser',
561
define,
562
format: 'esm',
563
target: isBuild ? config.build.target || undefined : ESBUILD_MODULES_TARGET,
0 commit comments