-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
48 lines (42 loc) · 909 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
48
var webpack = require('webpack')
module.exports = {
context: __dirname + "/app/js",
entry: './app',
output: {
path: __dirname + "/public/js/generated",
publicPath: '/js/generated/',
filename: "bundle.js"
},
devtool: 'source-map', //just do inline source maps instead of the default
module: {
preLoaders: [{
test: /\.jsx?$/,
loader: 'eslint-loader',
exclude: /node_modules/,
}],
loaders: [{
test: /.jsx?$/,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
presets: ['es2015', 'react']
}
},
{
test: /\.css$/,
loader: "style-loader!css-loader"
}]
},
devServer: {
proxy: {
'/api/*': {
target: 'http://localhost:3000',
secure: false
},
'/auth/*': {
target: 'http://localhost:3000',
secure: false
}
}
},
}