You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whenever src/index.ts changes to an invalid syntax, a single warning is emitted.
Actual Behavior
Whenever the file src/index.ts is changed to an invalid syntax, Rollup emits additionals warning:
change the file one time, rollup will emit 2 warnings
change the file one more time, rollup will emit 4 warnings
change the file one more time, rollup will emit 6 warnings
Basically, rollup emit n warnings, n begin the number of times the file was changed multiplied by 2.
$ node test.mjs
(typescript plugin) src/index.ts (1:9) @rollup/plugin-typescript TS2551: Property 'logs' does not exist on type'Console'. Did you mean 'log'?
FILE CHANGED src/index.ts
(typescript plugin) src/index.ts (1:9) @rollup/plugin-typescript TS2551: Property 'logss' does not exist on type'Console'. Did you mean 'log'?
(typescript plugin) src/index.ts (1:9) @rollup/plugin-typescript TS2551: Property 'logss' does not exist on type'Console'. Did you mean 'log'?
FILE CHANGED src/index.ts
(typescript plugin) src/index.ts (1:9) @rollup/plugin-typescript TS2339: Property 'logsss' does not exist on type'Console'.
(typescript plugin) src/index.ts (1:9) @rollup/plugin-typescript TS2339: Property 'logsss' does not exist on type'Console'.
(typescript plugin) src/index.ts (1:9) @rollup/plugin-typescript TS2339: Property 'logsss' does not exist on type'Console'.
(typescript plugin) src/index.ts (1:9) @rollup/plugin-typescript TS2339: Property 'logsss' does not exist on type'Console'.
FILE CHANGED src/index.ts
(typescript plugin) src/index.ts (1:9) @rollup/plugin-typescript TS2339: Property 'logssss' does not exist on type'Console'.
(typescript plugin) src/index.ts (1:9) @rollup/plugin-typescript TS2339: Property 'logssss' does not exist on type'Console'.
(typescript plugin) src/index.ts (1:9) @rollup/plugin-typescript TS2339: Property 'logssss' does not exist on type'Console'.
(typescript plugin) src/index.ts (1:9) @rollup/plugin-typescript TS2339: Property 'logssss' does not exist on type'Console'.
(typescript plugin) src/index.ts (1:9) @rollup/plugin-typescript TS2339: Property 'logssss' does not exist on type'Console'.
(typescript plugin) src/index.ts (1:9) @rollup/plugin-typescript TS2339: Property 'logssss' does not exist on type'Console'.
FILE CHANGED src/index.ts
(typescript plugin) src/index.ts (1:9) @rollup/plugin-typescript TS2339: Property 'logsssss' does not exist on type'Console'.
(typescript plugin) src/index.ts (1:9) @rollup/plugin-typescript TS2339: Property 'logsssss' does not exist on type'Console'.
(typescript plugin) src/index.ts (1:9) @rollup/plugin-typescript TS2339: Property 'logsssss' does not exist on type'Console'.
(typescript plugin) src/index.ts (1:9) @rollup/plugin-typescript TS2339: Property 'logsssss' does not exist on type'Console'.
(typescript plugin) src/index.ts (1:9) @rollup/plugin-typescript TS2339: Property 'logsssss' does not exist on type'Console'.
(typescript plugin) src/index.ts (1:9) @rollup/plugin-typescript TS2339: Property 'logsssss' does not exist on type'Console'.
(typescript plugin) src/index.ts (1:9) @rollup/plugin-typescript TS2339: Property 'logsssss' does not exist on type'Console'.
(typescript plugin) src/index.ts (1:9) @rollup/plugin-typescript TS2339: Property 'logsssss' does not exist on type'Console'.
Additional Information
This behaviour seems to indicate that the typescript plugin watches the src/index.ts file and triggers a build (from the inner TypeScript compiler) whenever it changes. Since chokidar is also watching the file and triggering the rollup build on change - instantiating another plugin in the process, we end up with the warning being emitted for each previously build trigerred plus the current one.
This seems to be confirmed by the source code of the plugin itself which instantiate a watch compiler host:
Expected Behavior
Whenever
src/index.ts
changes to an invalid syntax, a single warning is emitted.Actual Behavior
Whenever the file
src/index.ts
is changed to an invalid syntax, Rollup emits additionals warning:Basically, rollup emit n warnings, n begin the number of times the file was changed multiplied by 2.
Additional Information
This behaviour seems to indicate that the typescript plugin watches the
src/index.ts
file and triggers a build (from the inner TypeScript compiler) whenever it changes. Sincechokidar
is also watching the file and triggering the rollup build on change - instantiating another plugin in the process, we end up with the warning being emitted for each previously build trigerred plus the current one.This seems to be confirmed by the source code of the plugin itself which instantiate a watch compiler host:
plugins/packages/typescript/src/watchProgram.ts
Line 148 in 33174f9
The text was updated successfully, but these errors were encountered: