forked from shouheiyamauchi/react-passport-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
32 lines (26 loc) · 876 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
const path = require('path');
module.exports = {
// the entry file for the bundle
entry: path.join(__dirname, '/client/src/app.jsx'),
// the bundle file we will get in the result
output: {
path: path.join(__dirname, '/client/dist/js'),
filename: 'app.js',
},
module: {
// apply loaders to files that meet given conditions
// npm install --save-dev babel-plugin-transform-es2015-destructuring
// npm install --save-dev babel-plugin-transform-object-rest-spread
loaders: [{
test: /\.jsx?$/,
include: path.join(__dirname, '/client/src'),
loader: 'babel-loader',
query: {
presets: ["react", "es2015"],
plugins: ["transform-es2015-destructuring", "transform-object-rest-spread"]
}
}],
},
// start Webpack in a watch mode, so Webpack will rebuild the bundle on changes
watch: true
};