forked from bdyetton/MODA
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack-dev.config.js
More file actions
37 lines (35 loc) · 851 Bytes
/
Copy pathwebpack-dev.config.js
File metadata and controls
37 lines (35 loc) · 851 Bytes
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
var commonConfig = require('./webpack-common.config.js');
var devLoaders = [
// javascript/jsx loader - https://www.npmjs.com/package/babel-loader - with the react-hot loader
{
test: /\.jsx?$/,
exclude: /node_modules/,
loaders: ['react-hot', 'babel-loader?stage=0&optional=runtime'],
}
]
module.exports = {
entry: [
// setup the hot mobule loading
'webpack-dev-server/client?http://localhost:8080',
'webpack/hot/only-dev-server',
// our entry file
'./app/main.js'
],
output: {
path: './build',
filename: 'bundle.[hash].js'
},
devtool: 'eval',
devServer: {
// proxy calls to api to our own node server backend
proxy: {
'/api/*': 'http://localhost:5000/'
}
},
module: {
loaders: commonConfig.loaders.concat(devLoaders)
},
plugins: [
commonConfig.indexPagePlugin
],
};