Avoid double builds

This commit is contained in:
Jake Archibald
2020-11-12 12:28:34 +00:00
parent 52b3d0063f
commit f1da577ba3

View File

@@ -93,8 +93,15 @@ export default async function ({ watch }) {
assetFileNames: staticPath,
exports: 'named',
},
watch: {
clearScreen: false,
// Don't watch the ts files. Instead we watch the output from the ts compiler.
watch: { clearScreen: false, exclude: ['**/*.ts', '**/*.tsx'] },
exclude: ['**/*.ts', '**/*.tsx'],
// Sometimes TypeScript does its thing a little slowly, which causes
// Rollup to build twice on each change. This delay seems to fix it,
// although we may need to change this number over time.
buildDelay: 250,
},
preserveModules: true,
plugins: [
{ resolveFileUrl, resolveImportMeta },