-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathwebpack.config.dev.js
More file actions
56 lines (54 loc) · 1.25 KB
/
webpack.config.dev.js
File metadata and controls
56 lines (54 loc) · 1.25 KB
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
49
50
51
52
53
54
55
56
'use strict'
let path = require('path')
let webpack = require('webpack')
module.exports = {
devtool: 'cheap-module-eval-source-map',
entry: {
bundle: [
'eventsource-polyfill', // necessary for hot reloading with IE
'webpack-hot-middleware/client',
'./src/index'
],
// 'docs': [
// 'eventsource-polyfill', // necessary for hot reloading with IE
// 'webpack-hot-middleware/client',
// './docs/app.js'
// ],
'examples': [
'eventsource-polyfill', // necessary for hot reloading with IE
'webpack-hot-middleware/client',
'./examples/app.js'
]
},
output: {
path: path.join(__dirname, 'dist'),
filename: '[name].js',
publicPath: '/static/'
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin()
],
resolve: {
modulesDirectories: [
path.join(__dirname, 'src'),
'node_modules'
]
},
module: {
loaders: [
{
test: /\.jsx?/,
loaders: [ 'babel' ],
include: [
path.join(__dirname, 'src'),
path.join(__dirname, 'docs'),
path.join(__dirname, 'examples')
]
},
{
test: /\.png$/, loader: 'url-loader?limit=100000'
}
]
}
}