-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.dev.js
47 lines (43 loc) · 978 Bytes
/
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
44
45
46
47
'use strict'
var webpack = require('webpack')
var HtmlWebpackPlugin = require('html-webpack-plugin')
var env = process.env.NODE_ENV
var path = require('path')
var devConfig = {
module: {
loaders: [
{ test: /\.js$/, loaders: ['babel-loader'], exclude: /node_modules/ },
{
test: /\.css$/,
loaders: [
'style?sourceMap',
'css-loader'
]
}
]
},
entry: path.resolve(__dirname, './examples/index.js'),
output: {
library: 'ReactReduxLoadmask',
libraryTarget: 'umd',
output: {
filename: 'bundle.js',
publicPath: '/static/'
}
},
plugins: [
new HtmlWebpackPlugin({
title: 'React Redux Loadmask Demo',
template: path.resolve(__dirname, './examples/index.html')
}),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(env)
})
],
devServer: {
hot: true,
host: '0.0.0.0',
port: 3001
}
}
module.exports = devConfig