-
Notifications
You must be signed in to change notification settings - Fork 14
/
webpack.config.js
38 lines (37 loc) · 797 Bytes
/
webpack.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
/* global require, module, process, __dirname */
const path = require('path');
const HTMLWebpackPlugin = require('html-webpack-plugin');
module.exports = {
mode: process.env.NODE_ENV,
devtool: 'inline-source-map',
devServer: {
contentBase: './src',
hot: true,
},
entry: './src/index.js',
module: {
rules: [
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
},
],
},
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist'),
},
node: {
// Buffer: true,
},
plugins: [
new HTMLWebpackPlugin({
template: './src/participate.html',
filename: 'index.html',
}),
// new HTMLWebpackPlugin({
// template: './src/ballot.html',
// filename: 'voting.html',
// })
],
};