-
Notifications
You must be signed in to change notification settings - Fork 247
/
Copy pathwebpack.main.js
38 lines (36 loc) · 1.07 KB
/
webpack.main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
const path = require('path');
const makeConfig = require('./webpack.makeConfig.js');
module.exports = makeConfig(
{
target: 'electron-main',
entry: {
main: './src/main/index.js'
},
context: path.resolve(__dirname),
externals: [
'source-map-support',
'electron',
'webpack',
'webpack/hot/log-apply-result',
'electron-webpack/out/electron-main-hmr/HmrClient',
'source-map-support/source-map-support.js'
],
output: {
filename: '[name].js',
chunkFilename: '[name].bundle.js',
assetModuleFilename: 'static/assets/[name].[hash][ext]',
libraryTarget: 'commonjs2',
path: path.resolve(__dirname, 'dist/main')
},
module: {rules: []},
node: {__dirname: false, __filename: false}
},
{
name: 'main',
useReact: false,
disableDefaultRulesForExtensions: ['js'],
babelPaths: [
path.resolve(__dirname, 'src', 'main')
]
}
);