-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.dev.js
34 lines (32 loc) · 898 Bytes
/
webpack.dev.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
/* eslint-disable import/no-extraneous-dependencies */
const webpack = require('webpack');
const merge = require('webpack-merge');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ErrorOverlayPlugin = require('error-overlay-webpack-plugin');
const commonConfig = require('./webpack.common');
const config = merge(commonConfig, {
mode: 'development',
devtool: 'cheap-module-source-map',
devServer: {
overlay: {
error: true,
warning: true,
},
hot: true,
},
plugins: [
new HtmlWebpackPlugin({
template: './public/game.html',
filename: 'game.html',
excludeChunks: ['index'],
}),
new HtmlWebpackPlugin({
template: './public/index.html',
filename: 'index.html',
excludeChunks: ['game'],
}),
new ErrorOverlayPlugin(),
new webpack.HotModuleReplacementPlugin(),
],
});
module.exports = config;