-
Notifications
You must be signed in to change notification settings - Fork 2
/
webpack.config.dev.js
36 lines (35 loc) · 1.23 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
// For info about this file refer to webpack and webpack-hot-middleware documentation
import webpack from 'webpack';
import path from 'path';
export default {
debug: true,
devtool: 'cheap-module-eval-source-map', // More info: https://webpack.github.io/docs/build-performance.html#sourcemaps and https://webpack.github.io/docs/configuration.html#devtool
noInfo: true, // Set to false to see a list of every file being bundled.
entry: [
'eventsource-polyfill', // Necessary for hot reloading with IE
'webpack-hot-middleware/client?reload=true', // Note that it reloads the page if hot module reloading fails.
'./src/app/index'
],
target: 'web',
output: { // Note: Only prod environment actually outputs files.
path: __dirname + '/dist',
publicPath: '',
filename: 'bundle.js'
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin()
],
module: {
loaders: [
{test: /(\.js|\.jsx)$/, include: path.join(__dirname, 'src'), loaders: ['babel']},
{test: /\.ico(\?v=\d+\.\d+\.\d+)?$/, loader: "url?mimetype=image/x-icon"}
]
},
resolve: {
alias: {
'react': path.join(__dirname, 'node_modules', 'react')
},
extensions: ['', '.js', '.jsx']
}
};