mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-27 20:49:53 +08:00
test: enable codecov bundle analysis (#50384)
This commit is contained in:
parent
700e0aeebe
commit
2f64ecf7a8
1
.github/workflows/size-limit.yml
vendored
1
.github/workflows/size-limit.yml
vendored
@ -27,5 +27,6 @@ jobs:
|
||||
env:
|
||||
NODE_OPTIONS: "--max_old_space_size=4096"
|
||||
PRODUCTION_ONLY: 1
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
NO_DUP_CHECK: 1
|
||||
CI_JOB_NUMBER: 1
|
||||
|
@ -156,6 +156,7 @@
|
||||
"@antv/g6": "^4.8.24",
|
||||
"@babel/eslint-plugin": "^7.24.7",
|
||||
"@biomejs/biome": "^1.8.3",
|
||||
"@codecov/webpack-plugin": "^0.0.1-beta.10",
|
||||
"@codesandbox/sandpack-react": "^2.18.0",
|
||||
"@dnd-kit/core": "^6.1.0",
|
||||
"@dnd-kit/modifiers": "^7.0.0",
|
||||
|
@ -35,17 +35,13 @@
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
border-bottom: 1px solid #ddd;
|
||||
width: 33%;
|
||||
}
|
||||
|
||||
td img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
th,
|
||||
td {
|
||||
width: 33%;
|
||||
}
|
||||
|
||||
th {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
@ -112,4 +108,4 @@
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
|
@ -2,6 +2,7 @@
|
||||
// This config is for building dist files
|
||||
const getWebpackConfig = require('@ant-design/tools/lib/getWebpackConfig');
|
||||
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
|
||||
const { codecovWebpackPlugin } = require('@codecov/webpack-plugin');
|
||||
const { EsbuildPlugin } = require('esbuild-loader');
|
||||
const CircularDependencyPlugin = require('circular-dependency-plugin');
|
||||
const DuplicatePackageCheckerPlugin = require('@madccc/duplicate-package-checker-webpack-plugin');
|
||||
@ -39,6 +40,15 @@ if (process.env.PRODUCTION_ONLY) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('🍐 Build production only');
|
||||
webpackConfig = webpackConfig.filter((config) => config.mode === 'production');
|
||||
webpackConfig.forEach((config) => {
|
||||
config.plugins.push(
|
||||
codecovWebpackPlugin({
|
||||
enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
|
||||
bundleName: 'antd',
|
||||
uploadToken: process.env.CODECOV_TOKEN,
|
||||
}),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
if (process.env.RUN_ENV === 'PRODUCTION') {
|
||||
|
Loading…
Reference in New Issue
Block a user