forked from good-parts/aws-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 9
/
webpack.dev.config.js
executable file
·50 lines (48 loc) · 1013 Bytes
/
webpack.dev.config.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
39
40
41
42
43
44
45
46
47
48
49
50
const webpack = require('webpack')
const merge = require('webpack-merge')
const common = require('./webpack.common.js')
const OpenBrowserPlugin = require('open-browser-webpack-plugin')
module.exports = merge(common, {
entry: {
main: ['./src/client/index.js']
},
mode: 'development',
devtool: 'inline-source-map',
devServer: {
historyApiFallback: true,
hot: true,
inline: true,
host: 'localhost',
port: 3000,
proxy: {
'/api/*': {
target: 'http://localhost:8080/',
secure: false
}
}
},
module: {
rules: [
{
test: /\.html$/,
use: [
{
loader: "html-loader"
}
]
},
{
test: /\.(png|svg|jpg|gif)$/,
use: ['file-loader']
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader']
}
]
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new OpenBrowserPlugin({ url: 'http://localhost:3000' })
]
})