-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.dev.js
More file actions
32 lines (31 loc) · 739 Bytes
/
webpack.dev.js
File metadata and controls
32 lines (31 loc) · 739 Bytes
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
const path = require('path');
const merge = require('webpack-merge');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const common = require('./webpack.config');
module.exports = merge(common, {
entry: [
'@babel/polyfill',
path.join(__dirname, 'src', 'client', 'index.jsx'),
],
devServer: {
open: true,
hot: true,
proxy: [{
context: ['/api'],
target: 'http://localhost:443',
}],
port: 3000,
historyApiFallback: {
rewrites: [
{ from: /\/*$/, to: '/public/index.html' },
],
},
},
plugins: [
new HtmlWebpackPlugin({
template: path.join(__dirname, 'src', 'client', 'index.html'),
})
],
devtool: 'source-map',
mode: 'development',
});