forked from Semantic-Org/Semantic-UI-React
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.umd.config.js
43 lines (40 loc) · 943 Bytes
/
webpack.umd.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
const config = require('./config')
const webpack = require('webpack')
const webpackConfig = require('./webpack.config')
const pkg = require('./package.json')
const { paths } = config
const webpackUMDConfig = {
target: 'web',
devtool: false,
entry: {
[pkg.name]: paths.src('umd.js'),
},
output: {
filename: '[name].min.js',
libraryTarget: 'umd',
library: 'semanticUIReact',
path: paths.dist('umd'),
publicPath: '/',
pathinfo: true,
},
externals: {
react: 'React',
'react-dom': 'ReactDOM',
},
plugins: [
new webpack.optimize.OccurrenceOrderPlugin(),
new webpack.optimize.DedupePlugin(),
new webpack.optimize.UglifyJsPlugin({
compress: {
unused: true,
dead_code: true,
warnings: false,
},
}),
],
module: {
noParse: webpackConfig.module.noParse,
loaders: webpackConfig.module.loaders,
},
}
module.exports = webpackUMDConfig