Skip to content

Commit

Permalink
fix: suppress terser warning if minify disabled (#15275)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy authored Dec 7, 2023
1 parent 8e4655c commit 3e42611
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/vite/src/node/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,11 @@ export async function resolveConfig(

// validate config

if (config.build?.terserOptions && config.build.minify !== 'terser') {
if (
config.build?.terserOptions &&
config.build.minify &&
config.build.minify !== 'terser'
) {
logger.warn(
colors.yellow(
`build.terserOptions is specified but build.minify is not set to use Terser. ` +
Expand Down

0 comments on commit 3e42611

Please sign in to comment.