-
Notifications
You must be signed in to change notification settings - Fork 161
/
webpack.config.js
40 lines (39 loc) · 1.18 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
var path = require('path');
var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
module.exports = {
entry: './src/ReactImageMagnify.js',
output: {
path: path.resolve(__dirname, './dist/umd'),
filename: 'ReactImageMagnify.js',
library: 'ReactImageMagnify',
libraryTarget: 'umd'
},
externals: {
react: {
commonjs: 'react',
commonjs2: 'react',
amd: 'react',
umd: 'react',
root: 'React'
}
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader'
}
]
},
plugins: [new BundleAnalyzerPlugin({
/**
* Can be `server`, `static` or `disabled`.
* In `server` mode analyzer will start HTTP server to show bundle report.
* In `static` mode single HTML file with bundle report will be generated.
* In `disabled` mode you can use this plugin to just generate Webpack Stats
* JSON file by setting `generateStatsFile` to true.
*/
analyzerMode: 'disabled',
})]
};