mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-04 04:58:55 +08:00
Merge pull request #16921 from ant-design/packtracker
test: Add packtracker
This commit is contained in:
commit
8b1985bc9b
@ -97,6 +97,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ant-design/colors": "^3.0.0",
|
||||
"@packtracker/webpack-plugin": "^2.0.1",
|
||||
"@sentry/browser": "^5.0.3",
|
||||
"@types/classnames": "^2.2.6",
|
||||
"@types/prop-types": "^15.5.6",
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* eslint no-param-reassign: 0 */
|
||||
// This config is for building dist files
|
||||
const getWebpackConfig = require('antd-tools/lib/getWebpackConfig');
|
||||
const PacktrackerPlugin = require('@packtracker/webpack-plugin');
|
||||
|
||||
const { webpack } = getWebpackConfig;
|
||||
|
||||
@ -35,6 +36,14 @@ if (process.env.RUN_ENV === 'PRODUCTION') {
|
||||
ignoreMomentLocale(config);
|
||||
externalMoment(config);
|
||||
addLocales(config);
|
||||
// https://docs.packtracker.io/uploading-your-webpack-stats/webpack-plugin
|
||||
config.plugins.push(
|
||||
new PacktrackerPlugin({
|
||||
project_token: '8adbb892-ee4a-4d6f-93bb-a03219fb6778',
|
||||
upload: process.env.CI === 'true',
|
||||
fail_build: true,
|
||||
}),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user