Open aadiene opened 4 years ago
@aadiene you can create a custom.webpack.additions.js
for renderer.webpackConfig
to modify minimizer option
module.exports = (config) => {
if (config.mode === 'production') {
config.optimization.minimizer = [new TerserPlugin({
// ... your config
terserOptions: {
mangle: false
}
})];
}
console.log(JSON.stringify(config, null, 2)); // to check if you have right set of configs
return config;
};
I am trying to inject a preload script with a require exposition so I can use Spectron with it as recommended here
But when running electron-webpack, minification change the function name and the require exposition does not work anymore.
Could you please give us a way to disable minification ?