wewechat-plus-plus/config/webpack.config.electron.js
Riceneeder 58ce6cb67b wewechat++ init
仓库提交至星火社区作品集

Signed-off-by: Riceneeder <86492950+Riceneeder@users.noreply.github.com>
2022-09-01 20:38:13 +08:00

41 lines
855 B
JavaScript

import MinifyPlugin from 'babel-minify-webpack-plugin';
import config from './index';
import baseConfig from './webpack.config.base';
export default {
...baseConfig,
mode: 'production',
devtool: false,
entry: [
'babel-polyfill',
`./main.js`,
],
output: {
path: config.dist,
filename: 'main.js'
},
plugins: [
// Minify the output
new MinifyPlugin(),
],
// https://github.com/chentsulin/webpack-target-electron-renderer#how-this-module-works
target: 'electron-main',
/**
* Disables webpack processing of __dirname and __filename.
* If you run the bundle in node.js it falls back to these values of node.js.
* https://github.com/webpack/webpack/issues/2010
*/
node: {
__dirname: false,
__filename: false
}
};