Skip to content

Commit

Permalink
fix: node platform for ssr dev regression (#8840)
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev committed Jun 28, 2022
1 parent cbefc63 commit 7257fd8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/vite/src/node/optimizer/index.ts
Expand Up @@ -554,10 +554,7 @@ export async function runOptimizeDeps(
// We can't use platform 'neutral', as esbuild has custom handling
// when the platform is 'node' or 'browser' that can't be emulated
// by using mainFields and conditions
platform:
config.build.ssr && config.ssr?.target !== 'webworker'
? 'node'
: 'browser',
platform: ssr && config.ssr?.target !== 'webworker' ? 'node' : 'browser',
define,
format: 'esm',
target: isBuild ? config.build.target || undefined : ESBUILD_MODULES_TARGET,
Expand Down

0 comments on commit 7257fd8

Please sign in to comment.