mirror of
https://github.com/socketio/socket.io.git
synced 2026-01-09 15:08:12 -05:00
refactor(sio-client): mangle private attributes
| | before | after | |----------|---------|---------| | min+gzip | 14.6 KB | 14.3 KB | | min+br | 13.1 KB | 12.9 KB | Reference: https://terser.org/docs/options/#mangle-properties-options
This commit is contained in:
@@ -15,7 +15,15 @@ module.exports = {
|
||||
file: "./dist/socket.io.esm.min.js",
|
||||
format: "esm",
|
||||
sourcemap: true,
|
||||
plugins: [terser()],
|
||||
plugins: [
|
||||
terser({
|
||||
mangle: {
|
||||
properties: {
|
||||
regex: /^_/,
|
||||
},
|
||||
},
|
||||
}),
|
||||
],
|
||||
banner,
|
||||
},
|
||||
plugins: [
|
||||
|
||||
@@ -47,7 +47,15 @@ const prodBundle = {
|
||||
format: "umd",
|
||||
name: "io",
|
||||
sourcemap: true,
|
||||
plugins: [terser()],
|
||||
plugins: [
|
||||
terser({
|
||||
mangle: {
|
||||
properties: {
|
||||
regex: /^_/,
|
||||
},
|
||||
},
|
||||
}),
|
||||
],
|
||||
banner,
|
||||
},
|
||||
plugins: [
|
||||
|
||||
Reference in New Issue
Block a user