Merge pull request #12176 from bz2/mangle_private_members
Allow private class members to be mangled
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
const path = require('path');
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
|
||||
module.exports = {
|
||||
entry: './build/index.js',
|
||||
devtool: 'source-map',
|
||||
@@ -31,6 +33,16 @@ module.exports = {
|
||||
ol: path.resolve('./build/ol'),
|
||||
},
|
||||
},
|
||||
optimization: {
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
terserOptions: {
|
||||
// Mangle private members convention with underscore suffix
|
||||
mangle: {properties: {regex: /_$/}},
|
||||
},
|
||||
}),
|
||||
],
|
||||
},
|
||||
output: {
|
||||
path: path.resolve('./build/legacy'),
|
||||
filename: 'ol.js',
|
||||
|
||||
Reference in New Issue
Block a user