-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.renderer.dev.js
More file actions
40 lines (35 loc) · 1.08 KB
/
webpack.config.renderer.dev.js
File metadata and controls
40 lines (35 loc) · 1.08 KB
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
39
40
const path = require('path');
const webpack = require('webpack');
const { merge } = require('webpack-merge');
const common = require('./webpack.config.renderer.common.js');
const HtmlWebPackPlugin = require( 'html-webpack-plugin' );
const devConfig = {
output: {
path: path.join(__dirname, 'build'),
publicPath: "/",
filename: "renderer.bundle.js",
assetModuleFilename: 'assets/[hash][ext][query]',
libraryTarget: 'commonjs2'
},
externals: {
react: "commonjs react",
"react-dom": "commonjs react-dom",
},
devServer: {
static: {
directory: path.join(__dirname, 'src/renderer/Public')
},
historyApiFallback: true,
hot: true,
compress: true,
port: 8182
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new HtmlWebPackPlugin({
template: path.join(__dirname, 'src/renderer/Public/index.html'),
filename: 'index.html'
})
],
}
module.exports = merge(common, devConfig);