diff --git a/src/index.ts b/src/index.ts index 0977063b..43895d07 100644 --- a/src/index.ts +++ b/src/index.ts @@ -95,7 +95,7 @@ const typescript: PluginImpl = (options) => rollupOptions = {... config}; context = new ConsoleContext(pluginOptions.verbosity, "rpt2: "); - watchMode = process.env.ROLLUP_WATCH === "true"; + watchMode = process.env.ROLLUP_WATCH === "true" || !!this.meta.watchMode; // meta.watchMode was added in 2.14.0 to capture watch via Rollup API (i.e. no env var) (c.f. https://github.com/rollup/rollup/blob/master/CHANGELOG.md#2140) ({ parsedTsConfig: parsedConfig, fileName: tsConfigPath } = parseTsConfig(context, pluginOptions)); if (generateRound === 0)