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 }