Skip to content

Commit

Permalink
fix(plugin-legacy): no build.target override on SSR build (#12171)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tal500 authored Mar 1, 2023
1 parent 1e1cd3b commit a1019f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/plugin-legacy/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ function viteLegacyPlugin(options: Options = {}): Plugin[] {
name: 'vite:legacy-config',

config(config, env) {
if (env.command === 'build') {
if (env.command === 'build' && !config.build?.ssr) {
if (!config.build) {
config.build = {}
}
Expand Down

0 comments on commit a1019f8

Please sign in to comment.