-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
38 lines (37 loc) · 998 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
const webpack = require('webpack')
const htmlWebpackPlugin = require('html-webpack-plugin')
const LiveReloadPlugin = require('@kooneko/livereload-webpack-plugin') //This package resolved compatibility issues
module.exports = {
mode: 'development',
entry: './src/client/index.js',
output: {
path: __dirname + '/public/client/',
publicPath: '/',
filename: 'bundle.js'
},
module: {
rules: [
{
use: 'babel-loader',
test: /\.js$/,
exclude: /node_modules/
},
{
use: ['style-loader', 'css-loader'],
test: /\.css$/
},
{
test: /\.(jpg|png)$/,
use: {
loader: 'url-loader',
}
}
]
},
plugins: [
new htmlWebpackPlugin({
template: './public/index.html'
}),
new LiveReloadPlugin()
]
}