-
Notifications
You must be signed in to change notification settings - Fork 137
/
webpack.anal.js
37 lines (36 loc) · 990 Bytes
/
webpack.anal.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
const path = require('path');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
module.exports = {
mode: 'production',
entry: './src/index.ts',
module: {
rules: [{
test: /\.ts$/,
loader: 'ts-loader',
exclude: [/node_modules/, /src\/Demo/]
}]
},
plugins: [
new BundleAnalyzerPlugin({
analyzerMode: 'server',
analyzerHost: '127.0.0.1',
analyzerPort: 8888,
reportFilename: 'report.html',
defaultSizes: 'parsed',
openAnalyzer: false,
generateStatsFile: false,
statsFilename: 'stats.json',
statsOptions: null,
logLevel: 'info'
})
],
resolve: {
extensions: [".ts", ".js"]
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'index.js',
library: 'Poplar',
libraryTarget: "umd"
}
};