Skip to content

Commit

Permalink
fix: use esbuildOptions.platform as rollupOptions.platform for compat
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed Jan 10, 2025
1 parent a104db3 commit 66465a2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/vite/src/node/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1035,6 +1035,12 @@ function resolveDepOptimizationOptions(
optimizeDeps.rollupOptions.keepNames =
optimizeDeps.esbuildOptions.keepNames
}
if (
optimizeDeps.esbuildOptions.platform !== undefined &&
optimizeDeps.rollupOptions.platform === undefined
) {
optimizeDeps.rollupOptions.platform = optimizeDeps.esbuildOptions.platform
}

// NOTE: the following options cannot be converted
// - legalComments
Expand Down

0 comments on commit 66465a2

Please sign in to comment.