forked from SupremeTechnopriest/react-idle-timer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.dev.config.js
41 lines (38 loc) · 924 Bytes
/
webpack.dev.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
/**
* Webpack Dev Config
* react-hot-loader and babel
*
* @author Randy Lebeau
*
*/
var path = require('path');
var webpack = require('webpack');
function getJsxLoader() {
return { test: /\.jsx?$/
, loader: 'babel'
, exclude: /node_modules/
, include: [path.join(__dirname, 'examples'), path.join(__dirname, 'src')]
}
}
module.exports = {
devtool: 'eval',
watch: true,
cache: true,
entry: [ 'webpack-hot-middleware/client', './examples/init' ],
resolve: {
extensions: ['', '.jsx', '.js']
},
output: {
path: path.join(__dirname, 'examples'),
filename: 'script.js',
publicPath: '/'
},
plugins: [
new webpack.optimize.OccurenceOrderPlugin(true),
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin()
],
module: {
loaders: [ getJsxLoader() ]
}
}