-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
45 lines (44 loc) · 912 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
45
var path = require('path');
var HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
/*
entry: [
'./lib/src/app.js',
],
*/
entry:{
'page1': './lib/src/app.js',
'page2': './lib/src/page2/main.js'
},
output: {
path: path.join(__dirname, './public/js/'),
filename: '[name].js',
publicPath: '/js/'
},
module: {
loaders: [{
test: /.jsx?$/,
exclude: /node_modules/,
loader: 'babel',
query: { presets: ['react', 'es2015'],
plugins: ['recharts']}
},
{
test: /\.css$/,
loader: 'style!css?modules',
include: /flexboxgrid/,
}]
},
plugins: [
new HtmlWebpackPlugin({
inject: false,
chunks: ['page1'],
filename: 'public/index.html'
}),
new HtmlWebpackPlugin({
inject: false,
chunks: ['page2'],
filename: 'public/test.html'
})
]
};