rollup-plugin-typescript2
rollup-plugin-typescript2 copied to clipboard
clean: remove redundant `generateRound === 0` check
trafficstars
Summary
Removes the if (generateRound === 0) check in the options hook as it is redundant / unnecessary
- Related to, but independent of, #390
Details
-
when
optionsis called,generateRoundshould have already been reset to0, so this is redundant / unnecessaryoptionsis only called once per watch cycleoptionsis also aninputhook, not anoutputhook, i.e. it's only called once for all outputs, not per each outputgenerateRoundonly tracks the output round
-
this might be leftover historical remnants prior to Rollup officially separating
outputhooks, but even before then, it should only have been called once for all outputs- since, per the Rollup API, it's only called during
rollup.rollupand not duringbundle.generateetc - c.f. old docs https://github.com/rollup/rollup/blob/v1.18.0/docs/05-plugin-development.md#options
- it's possible this is even older, but I couldn't find plugin docs for Rollup pre-1.0 to try to confirm against
- since, per the Rollup API, it's only called during