-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.react.config.dev.js
45 lines (44 loc) · 1.24 KB
/
webpack.react.config.dev.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
const webpack = require('webpack');
const path = require('path');
module.exports = {
devtool: 'cheap-module-eval-source-map',
entry: [
'./src/client/index.js',
'whatwg-fetch'
],
output: {
filename: 'fod.query-constructor.dev.js',
path: path.join(__dirname, './assets'),
// https://github.com/gaearon/react-hot-loader/issues/92
publicPath: process.env.WEBPACK_DEV_SERVER_PATH
? process.env.WEBPACK_DEV_SERVER_PATH + '/assets'
: '/assets'
},
module: {
preLoaders: [
{
test: /\.js$/,
loader: 'eslint',
include: path.join(__dirname, './src/client'),
exclude: /node_modules/
}
],
loaders: [
{
test: /\.js$/,
include: path.join(__dirname, './src/client'),
loader: 'babel',
exclude: /node_modules/
},
{test: /\.css$/, loader: "style-loader!css-loader"}
]
},
plugins: [
new webpack.NoErrorsPlugin(),
new webpack.DefinePlugin({
'process.env': {
'NODE_ENV': '"development"'
}
})
]
};