-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
44 lines (37 loc) · 933 Bytes
/
webpack.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
42
43
44
var Webpack = require('webpack');
var path = require('path');
var libMainFile = path.resolve(__dirname, 'lib', 'index');
var demoMainFile = path.resolve(__dirname, 'docs', 'index');
var demoPath = path.resolve(__dirname, 'docs');
var nodePath = path.resolve(__dirname, 'node_modules');
var config = {
devtool: 'eval',
resolve: {
extensions: ['', '.js', '.jsx']
},
entry: [
// The lib itself
libMainFile,
// the demo page:
demoMainFile,
'webpack-dev-server/client?http://127.0.0.1:5000',
'webpack/hot/only-dev-server',
],
output: {
path: demoPath,
filename: 'bundle.js'
},
module: {
loaders: [
{
test: /\.(js|jsx)$/,
loader: 'babel',
exclude: [nodePath]
}
]
},
stats: {
colors: true,
},
};
module.exports = config;