-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.development.js
37 lines (29 loc) · 949 Bytes
/
webpack.development.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
const ip = require('internal-ip');
const merge = require('webpack-merge');
const path = require('path');
const webpack = require('webpack');
const FriendlyErrorsWebpackPlugin = require('friendly-errors-webpack-plugin');
function config(environment) {
return merge(require('./webpack.common.js')(environment), {
'devServer': {
'clientLogLevel': 'warning',
'contentBase': path.resolve(__dirname, 'dist/'),
'host': ip.v4.sync(),
'hot': true,
'open': true,
'overlay': {
'warnings': true,
'errors': true
},
'port': 8888,
'watchContentBase': true
},
'devtool': 'inline-source-map',
'mode': 'development',
'plugins': [
new FriendlyErrorsWebpackPlugin(),
new webpack.HotModuleReplacementPlugin()
]
});
}
module.exports = config;