-
Notifications
You must be signed in to change notification settings - Fork 28
/
webpack.config.dev.js
43 lines (40 loc) · 1.18 KB
/
webpack.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
/* eslint-disable max-len */
const path = require('path');
const webpack = require('webpack');
const webpackMerge = require('webpack-merge');
const baseConfig = require('./webpack.config.base');
const srcPath = path.join(__dirname, 'app');
module.exports = webpackMerge(baseConfig, {
debug: true,
devtool: 'cheap-module-eval-source-map',
entry: [
'webpack-hot-middleware/client?path=http://localhost:3000/__webpack_hmr',
'./index.js'
],
output: {
publicPath: 'http://localhost:3000/dist/'
},
module: {
loaders: [
{
test: /\.js$/,
loaders: [ 'react-hot', 'babel' ],
include: [ srcPath ]
},
{
test: /\.styl$/,
loader: 'style!css?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!postcss!stylus'
}
]
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.DefinePlugin({
'__DEV__': true,
'process.env': {
'NODE_ENV': JSON.stringify('development')
}
})
],
target: 'electron-renderer'
});