Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Saeed-Paris authored and Saeed-Paris committed May 18, 2023
1 parent 47efb77 commit d7acd98
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions packages/vite/src/node/ssr/index.ts
Expand Up @@ -47,14 +47,8 @@ export function resolveSSROptions(
): ResolvedSSROptions {
ssr ??= {}
const optimizeDeps = ssr.optimizeDeps ?? {}
let format: SSRFormat = 'esm'
let target: SSRTarget = 'node'
if (buildSsrCjsExternalHeuristics) {
format = 'cjs'
if (!ssr) {
target = 'node'
}
}
const format: SSRFormat = buildSsrCjsExternalHeuristics ? 'cjs' : 'esm'
const target: SSRTarget = 'node'
return {
format,
target,
Expand Down

0 comments on commit d7acd98

Please sign in to comment.