Skip to content

Commit

Permalink
fix(plugin-legacy): disable babel.compact when minify is disabled (#8244
Browse files Browse the repository at this point in the history
)
  • Loading branch information
sapphi-red authored May 20, 2022
1 parent baa9632 commit 742188c
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 @@ -311,7 +311,7 @@ function viteLegacyPlugin(options: Options = {}): Plugin[] {
const { code, map } = babel.transform(raw, {
babelrc: false,
configFile: false,
compact: true,
compact: !!config.build.minify,
sourceMaps,
inputSourceMap: sourceMaps ? chunk.map : undefined,
presets: [
Expand Down

0 comments on commit 742188c

Please sign in to comment.