mirror of
https://github.com/Terncode/pixel.horse.git
synced 2026-12-03 05:10:04 +01:00
Minify with SWC
This commit is contained in:
1 parent
a508a34b48
commit
7e3e2dc5b9
1 file changed
+6
-4
+6
-4
@@ -72,19 +72,21 @@ export default (args = {}) =>
|
||||
}),
|
||||
] : [
|
||||
new TerserPlugin({
|
||||
minify: TerserPlugin.swcMinify,
|
||||
extractComments: {
|
||||
condition: true,
|
||||
banner: false,
|
||||
},
|
||||
terserOptions: {
|
||||
sourceMap: true,
|
||||
ecma: 5,
|
||||
mangle: {
|
||||
properties: {
|
||||
regex: /^__(?!default$)/,
|
||||
// swc regex has no lookahead, so '__default' is kept through reserved list
|
||||
props: {
|
||||
regex: '^__',
|
||||
reserved: ['__default'],
|
||||
},
|
||||
},
|
||||
output: { comments: false },
|
||||
format: { comments: false },
|
||||
},
|
||||
}),
|
||||
];
|
||||
|
||||
Reference in new issue
Block a user