Skip to content

Commit 742188c

Browse files
authored
fix(plugin-legacy): disable babel.compact when minify is disabled (#8244)
1 parent baa9632 commit 742188c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/plugin-legacy/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ function viteLegacyPlugin(options: Options = {}): Plugin[] {
311311
const { code, map } = babel.transform(raw, {
312312
babelrc: false,
313313
configFile: false,
314-
compact: true,
314+
compact: !!config.build.minify,
315315
sourceMaps,
316316
inputSourceMap: sourceMaps ? chunk.map : undefined,
317317
presets: [

0 commit comments

Comments
 (0)