chore: adjust ci to save size-limit build time (#44148)

* chore: adjust ci

* chore: add message

* chore: lint
This commit is contained in:
二货爱吃白萝卜 2023-08-10 15:17:40 +08:00 committed by GitHub
parent 5af2dcc384
commit 48e4e89e32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -64,3 +64,4 @@ jobs:
skip_step: install
env:
NODE_OPTIONS: --max_old_space_size=4096
PRODUCTION_ONLY: 1

View File

@ -24,7 +24,14 @@ function externalDayjs(config) {
};
}
const webpackConfig = getWebpackConfig(false);
let webpackConfig = getWebpackConfig(false);
// Used for `size-limit` ci which only need to check min files
if (process.env.PRODUCTION_ONLY) {
// eslint-disable-next-line no-console
console.log('🍐 Build production only');
webpackConfig = webpackConfig.filter((config) => config.mode === 'production');
}
if (process.env.RUN_ENV === 'PRODUCTION') {
webpackConfig.forEach((config) => {