mirror of
https://github.com/ezolenko/rollup-plugin-typescript2.git
synced 2025-12-08 19:06:16 +00:00
refactor: move generateRound = 0 to buildEnd (#390)
- since the `buildEnd` hook exists nowadays, we can just reset it there, right before `generateBundle` is called for each output and increments it per output - also modify the comment to account for this change and the fact that `buildEnd` exists and is used nowadays
This commit is contained in:
parent
70c6e253e8
commit
3dda648f0f
@ -197,8 +197,6 @@ const typescript: PluginImpl<RPT2Options> = (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<RPT2Options> = (options) =>
|
||||
|
||||
buildEnd(err)
|
||||
{
|
||||
generateRound = 0; // in watch mode, buildEnd resets generate count just before generateBundle for each output
|
||||
|
||||
if (err)
|
||||
{
|
||||
buildDone();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user