Browse Source

add analysis (#20434)

pull/20435/head
二货机器人 5 years ago
committed by GitHub
parent
commit
193bf0f6b4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      .npmignore
  2. 1
      package.json
  3. 5
      webpack.config.js

1
.npmignore

@ -1 +1,2 @@
~*
dist/report.html

1
package.json

@ -239,6 +239,7 @@
"stylelint-declaration-block-no-ignored-properties": "^2.1.0",
"stylelint-order": "^3.0.0",
"typescript": "~3.7.2",
"webpack-bundle-analyzer": "^3.6.0",
"xhr-mock": "^2.4.1",
"xhr2": "^0.2.0",
"yaml-front-matter": "^4.0.0"

5
webpack.config.js

@ -3,6 +3,7 @@
const getWebpackConfig = require('@ant-design/tools/lib/getWebpackConfig');
const PacktrackerPlugin = require('@packtracker/webpack-plugin');
const IgnoreEmitPlugin = require('ignore-emit-webpack-plugin');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const { webpack } = getWebpackConfig;
@ -58,6 +59,10 @@ if (process.env.RUN_ENV === 'PRODUCTION') {
fail_build: true,
exclude_assets: name => !['antd.min.js', 'antd.min.css'].includes(name),
}),
new BundleAnalyzerPlugin({
analyzerMode: 'static',
openAnalyzer: false,
}),
);
}
});

Loading…
Cancel
Save