-
Notifications
You must be signed in to change notification settings - Fork 29
/
webpack.config.js
47 lines (46 loc) · 1.17 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
47
var path = require('path');
var webpack = require('webpack');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
quiet: false,
entry: [
'./src/js/'
],
output: {
library: 'JwtInspector',
libraryTarget: 'umd',
path: __dirname + '/build/',
filename: '/js/app.min.js'
},
externals: {
'react': 'React',
'react-dom': 'ReactDOM'
},
module: {
preLoaders: [{
test: /\.json$/,
loader: 'json'
}],
loaders: [{
test: /\.js$/,
loaders: ['babel'],
include: path.join(__dirname, './src/js/')
}, {
test: /\.less$/,
loader: ExtractTextPlugin.extract('style-loader', 'css-loader!less-loader'),
include: path.join(__dirname, './src/css/')
}]
},
plugins: [
new webpack.optimize.DedupePlugin(),
new ExtractTextPlugin('/css/app.min.css', {
allChunks: true
}),
new webpack.optimize.UglifyJsPlugin({
minimize: true,
compress: {
warnings: false
}
})
]
};