diff --git a/src/index.ts b/src/index.ts index 6195b3e..c3a27a2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -197,8 +197,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; @@ -267,6 +265,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();