diff --git a/src/index.ts b/src/index.ts index 6ec64ddf..055c9c7f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -196,8 +196,6 @@ const typescript: PluginImpl = (options) => transform(code, id) { - generateRound = 0; // in watch mode transform call resets generate count (used to avoid printing too many copies of the same error messages) - if (!filter(id)) return undefined; @@ -266,6 +264,8 @@ const typescript: PluginImpl = (options) => buildEnd(err) { + generateRound = 0; // in watch mode, buildEnd resets generate count just before generateBundle for each output + if (err) { buildDone();