Есть ли способ тщательно исказить vue
компоненты, которые были в комплекте с webpack
?
При применении каландрирования через terser-webpack-plugin
с mangle.properties
, установленным на true
, тогда не все имена свойств искажены, например:
location: {
lng: -.134281,
lat:51.513508,
zoom:13,
pitch:1,
bearing:60
}
становится
location:{
k:-.134281,
M:51.513508,
zoom:13,
pitch:1,
V:60
}
Редактировать
По запросу: соответствующая часть веб-пакетафайл конфигурации, в данном случае по умолчанию vie-cli
config с добавленным вручную элементом mangle.properties
:
minimizer: [
{
options: {
test: /\.m?js(\?.*)?$/i,
chunkFilter: () => true,
warningsFilter: () => true,
extractComments: false,
sourceMap: false,
cache: true,
cacheKeys: defaultCacheKeys => defaultCacheKeys,
parallel: true,
include: undefined,
exclude: undefined,
minify: undefined,
terserOptions: {
output: {
comments: /^\**!|@preserve|@license|@cc_on/i
},
compress: {
arrows: false,
collapse_vars: false,
comparisons: false,
computed_props: false,
hoist_funs: false,
hoist_props: false,
hoist_vars: false,
inline: false,
loops: false,
negate_iife: false,
properties: false,
reduce_funcs: false,
reduce_vars: false,
switches: false,
toplevel: false,
typeofs: false,
booleans: true,
if_return: true,
sequences: true,
unused: true,
conditionals: true,
dead_code: true,
evaluate: true
},
mangle: {
safari10: true,
properties: true
}
}
}
}
],