-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.docs.hot.config.js
More file actions
39 lines (36 loc) · 1014 Bytes
/
webpack.docs.hot.config.js
File metadata and controls
39 lines (36 loc) · 1014 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
33
34
35
36
37
38
39
const webpack = require('webpack');
const WriteFilePlugin = require('write-file-webpack-plugin');
const path = require('path');
const merge = require('webpack-merge');
const devConfig = require('./webpack.docs.config');
const hotConfig = {
plugins: [
new webpack.HotModuleReplacementPlugin(),
new WriteFilePlugin({ log: false }),
],
resolve: {
alias: {
react: path.resolve('./node_modules/react'),
'react-dom': path.resolve('./node_modules/react-dom'),
'react-redux': path.resolve('./node_modules/react-redux'),
},
},
devServer: {
noInfo: true,
quiet: false,
port: 5555,
historyApiFallback: true,
clientLogLevel: 'error',
hotOnly: true,
inline: true,
stats: { colors: true },
// host: '192.168.0.101', // make dev server available on specific IP
},
};
const mergedConfig = merge(devConfig, hotConfig);
mergedConfig.entry = [
'babel-polyfill',
'react-hot-loader/patch',
devConfig.entry[1],
];
module.exports = mergedConfig;