From 077bbe6c45b5a1d40e519d0ffd3442f88656fe64 Mon Sep 17 00:00:00 2001 From: Hugo Dias Date: Tue, 15 Dec 2020 15:53:04 +0000 Subject: [PATCH] fix: build types after bundle size (#695) So we can see bundle size output even if TS types fail. --- src/build/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/build/index.js b/src/build/index.js index df81d7c9f..874466fd8 100644 --- a/src/build/index.js +++ b/src/build/index.js @@ -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)) @@ -61,5 +57,9 @@ module.exports = async (argv) => { console.log(`${bytes(gzip)} (▼${bytes(diff)} / ${bytes(maxsize)})`) } } + + if (hasTsconfig) { + await tsCmd({ preset: 'types' }) + } return webpack }