-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.dev.js
39 lines (36 loc) · 1.16 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
var path = require('path');
var webpack = require('webpack');
var config = {
devtool: 'cheap-module-eval-source-map',
entry: [
'./client.js',
'webpack-hot-middleware/client'
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js',
publicPath: '/dist/'
},
plugins: [
new webpack.NoErrorsPlugin(),
new webpack.HotModuleReplacementPlugin()
],
module: {
loaders: [
{
test: /\.(js|jsx)$/,
loader: ['babel'],
exclude: /node_modules/,
query: {
presets: ['react-hmre', 'react', 'es2015', 'stage-0']
}
},
{ test: /\.css$/, loader: "style-loader!css-loader" },
{ test: /\.gif$/, loader: "url-loader?limit=10000&mimetype=image/gif" },
{ test: /\.jpg$/, loader: "url-loader?limit=10000&mimetype=image/jpg" },
{ test: /\.png$/, loader: "url-loader?limit=10000&mimetype=image/png" },
{ test: /\.svg/, loader: "url-loader?limit=26000&mimetype=image/svg+xml" }
]
}
};
module.exports = config;