forked from ecmascriptElephants/Monopoly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
47 lines (46 loc) · 943 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
39
40
41
42
43
44
45
46
47
const path = require('path')
module.exports = {
context: __dirname,
entry: ['whatwg-fetch', './client/app.jsx'],
output: {
path: path.join(__dirname, '/src'),
publicPath: '/src/',
filename: 'bundle.js'
},
devtool: '#eval-source-map',
devServer: {
publicPath: '/src/',
open: true,
historyApiFallback: true,
contentBase: './index'
},
resolve: {
extensions: ['.js', '.jsx', '.less', '.scss', '.css']
},
module: {
rules: [
{
test: /\.jsx?$/,
loader: 'eslint-loader',
exclude: /node_modules/,
enforce: 'pre'
},
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: 'babel-loader'
},
{
test: /\.json$/,
loader: 'json-loader',
enforce: 'post'
},
{
test: /\.less$/,
use: [
'style-loader', 'css-loader', 'less-loader'
]
}
]
}
}