ci: improve size script
This commit is contained in:
@@ -155,7 +155,7 @@ async function build(target) {
|
||||
}
|
||||
|
||||
function checkAllSizes(targets) {
|
||||
if (devOnly) {
|
||||
if (devOnly || (formats && !formats.includes('global'))) {
|
||||
return
|
||||
}
|
||||
console.log()
|
||||
@@ -168,7 +168,9 @@ function checkAllSizes(targets) {
|
||||
function checkSize(target) {
|
||||
const pkgDir = path.resolve(`packages/${target}`)
|
||||
checkFileSize(`${pkgDir}/dist/${target}.global.prod.js`)
|
||||
checkFileSize(`${pkgDir}/dist/${target}.runtime.global.prod.js`)
|
||||
if (!formats || formats.includes('global-runtime')) {
|
||||
checkFileSize(`${pkgDir}/dist/${target}.runtime.global.prod.js`)
|
||||
}
|
||||
}
|
||||
|
||||
function checkFileSize(filePath) {
|
||||
|
||||
Reference in New Issue
Block a user