Skip to content

Commit

Permalink
fix: build types after bundle size (#695)
Browse files Browse the repository at this point in the history
So we can see bundle size output even if TS types fail.
  • Loading branch information
hugomrdias authored Dec 15, 2020
1 parent 0a59a00 commit 077bbe6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/build/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ module.exports = async (argv) => {
stdio: 'inherit'
})

if (hasTsconfig) {
await tsCmd({ preset: 'types' })
}

if (argv.bundlesize) {
const stats = JSON.parse(fs.readFileSync(path.join(process.cwd(), 'dist/stats.json')))
const gzip = await gzipSize(path.join(stats.outputPath, stats.assets[0].name))
Expand All @@ -61,5 +57,9 @@ module.exports = async (argv) => {
console.log(`${bytes(gzip)} (▼${bytes(diff)} / ${bytes(maxsize)})`)
}
}

if (hasTsconfig) {
await tsCmd({ preset: 'types' })
}
return webpack
}

0 comments on commit 077bbe6

Please sign in to comment.