Unverified Commit 83c18dea authored by Donny/강동윤's avatar Donny/강동윤 Committed by GitHub

Pass same mangling option as terser to SWC minifier (#56281)

### What?

Pass `keep_classnames: true` to the SWC minifier, as we are passing it to `terser`.

### Why?

https://github.com/vercel/next.js/blob/5f7faac1e676be0819dd5d828bffed8a7105a78e/packages/next/src/build/webpack-config.ts#L953-L958

### How?

Closes WEB-1676
Fixes #55682
parent 5f7faac1
......@@ -166,7 +166,12 @@ export class TerserPlugin {
}
: {}),
compress: true,
mangle: true,
// This is the same option as terser
mangle: {
toplevel: true,
keep_classnames: true,
keep_fnames: true,
},
}
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment