We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3db69af commit 681775aCopy full SHA for 681775a
scripts/build.mjs
@@ -91,7 +91,7 @@ async function build(target) {
91
}
92
93
// if building a specific format, do not remove dist.
94
- if (!formats) {
+ if (!formats && existsSync(`${pkgDir}/dist`)) {
95
await fs.rm(`${pkgDir}/dist`, { recursive: true })
96
97
@@ -192,7 +192,7 @@ function checkFileSize(filePath) {
192
const gzipped = gzipSync(file)
193
const gzippedSize = (gzipped.length / 1024).toFixed(2) + 'kb'
194
const compressed = compress(file)
195
- const compressedSize = (compressed.length / 1024).toFixed(2) + 'kb'
+ const compressedSize = (compressed?.length || 0 / 1024).toFixed(2) + 'kb'
196
console.log(
197
`${chalk.gray(
198
chalk.bold(path.basename(filePath))
0 commit comments