-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.js
40 lines (38 loc) · 977 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
var path = require('path'),
ROOT_PATH = __dirname,
HtmlWebpackPlugin = require('html-webpack-plugin'),
OpenBrowserPlugin = require('open-browser-webpack-plugin');
//todo bundle.[hash].js for production
var url = 'http://localhost:8080';
module.exports = {
entry: [
'webpack/hot/dev-server',
'webpack-dev-server/client?'+url,
path.resolve(ROOT_PATH,'client/src/main.jsx')],
output:{
path:'client/build/js/',
filename: 'bundle.js',
publicPath: 'js'
},
resolve:{
extensions:['','.js','.jsx'],
path: ROOT_PATH
},
module:{
loaders:[
{test:/\.jsx$/, include: path.resolve(ROOT_PATH,'client/src'), loader:'babel'}
]
},
plugins:[
new HtmlWebpackPlugin({
title:'xls Drop',
filename:'../index.html',
template:'default_index.html'
}),
new OpenBrowserPlugin({url: url})
],
node:{
//https://github.com/webpack/jade-loader/issues/8 --webpack xlsx package errors
fs:'empty'
}
};