Skip to content

Commit 3e42611

Browse files
authored
fix: suppress terser warning if minify disabled (#15275)
1 parent 8e4655c commit 3e42611

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/vite/src/node/config.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,11 @@ export async function resolveConfig(
821821

822822
// validate config
823823

824-
if (config.build?.terserOptions && config.build.minify !== 'terser') {
824+
if (
825+
config.build?.terserOptions &&
826+
config.build.minify &&
827+
config.build.minify !== 'terser'
828+
) {
825829
logger.warn(
826830
colors.yellow(
827831
`build.terserOptions is specified but build.minify is not set to use Terser. ` +

0 commit comments

Comments
 (0)