-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack.config.js
More file actions
44 lines (43 loc) · 1.07 KB
/
webpack.config.js
File metadata and controls
44 lines (43 loc) · 1.07 KB
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
var path = require('path');
var SRC_DIR = path.join(__dirname, '/client/src');
var DIST_DIR = path.join(__dirname, '/client/dist');
var webpack = require('webpack');
module.exports = {
mode: 'development',
entry: [
// 'webpack-hot-middleware/client?reload=true',
`${SRC_DIR}/index.js`,
],
output: {
filename: 'bundle.js',
path: DIST_DIR
},
devtool: 'eval-source-map',
// plugins: [
// // OccurrenceOrderPlugin is needed for webpack 1.x only
// new webpack.optimize.OccurrenceOrderPlugin(),
// new webpack.HotModuleReplacementPlugin(),
// // Use NoErrorsPlugin for webpack 1.x
// new webpack.NoEmitOnErrorsPlugin()
// ],
module: {
rules: [
{
test: /\.jsx?/,
include: SRC_DIR,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
presets: [
"@babel/preset-env",
"@babel/preset-react"
]
}
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader']
}
]
},
};