forked from Semantic-Org/Semantic-UI-React
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.umd.config.js
More file actions
42 lines (38 loc) · 833 Bytes
/
webpack.umd.config.js
File metadata and controls
42 lines (38 loc) · 833 Bytes
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
import webpack from 'webpack'
import config from './config'
import pkg from './package.json'
import webpackConfig from './webpack.config.babel'
const { paths } = config
const webpackUMDConfig = {
target: 'web',
devtool: false,
entry: {
[pkg.name]: paths.src('umd.js'),
},
externals: {
react: 'React',
'react-dom': 'ReactDOM',
},
output: {
filename: '[name].min.js',
libraryTarget: 'umd',
library: 'semanticUIReact',
path: paths.dist('umd'),
publicPath: '/',
pathinfo: true,
},
plugins: [
new webpack.optimize.UglifyJsPlugin({
compress: {
unused: true,
dead_code: true,
warnings: false,
},
}),
],
module: {
noParse: webpackConfig.module.noParse,
rules: webpackConfig.module.rules,
},
}
export default webpackUMDConfig