forked from UKHomeOffice/drt-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
46 lines (40 loc) · 1.29 KB
/
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
46
'use strict';
var webpack = require('webpack');
var CommonsChunkPlugin = webpack.optimize.CommonsChunkPlugin;
module.exports = {
entry: {
index: './bundles/index.js',
elemental_ui: './bundles/elemental-ui.js',
material_ui: './bundles/material-ui.js',
react_tags_input: './bundles/react-tags-input.js',
react_select: './bundles/react-select.js',
react_geom_icons: './bundles/react-geom-icons.js',
react_infinite: './bundles/react-infinite.js',
react_spinner: './bundles/react-spinner.js' //react_slick: './bundles/react-slick.js'
},
output: {
path: __dirname + '/assets',
publicPath: "src/main/assets/",
filename: '[name]-bundle.js'
},
plugins: [
new webpack.NoErrorsPlugin(),
new CommonsChunkPlugin({
name: "index"
})
],
module: {
loaders: [
{
test: /\.css$/,
loader: 'style-loader!css-loader'
},
{
test: /\.(png|jpg|svg)$/,
loaders: [
'url-loader?limit=8192',
'image-webpack?optimizationLevel=7&progressive=true']
} // inline base64 URLs for <=8k images, direct URLs for the rest
]
}
};