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
The issue lies likely in how caching is handled in watch mode. The cache is only updated when a build completes successfully. When a module errors however, it should be evicted from the cache so that subsequent builds run it again. To solve this, maybe rollup can attach the cache to errors (similar to how watchFiles are added at the moment). Other options could be explored as well.
I do not think it is prudent to evict the entire cache on errors as this will mean a rebuild after an error will be unnecessarily slow while the user might be interested in a quick fix.
Instead of evicting erroring modules, we could also provide plugins with the option to manually evict modules from the cache. Still, the updated cache would need to be passed down to the caller of rollup.watch somehow.
The text was updated successfully, but these errors were encountered:
Expected Behavior
Run
npm install; npm start
.Rollup starts in watch mode and compiles successfully
Change
app.ts
toA type error is shown
Change
app.ts
back to its original stateRollup recompiles and the build is working again.
Actual Behavior
app.ts
back to its original stateRollup recompiles but reuses a cached version of
app.ts
and displays the type error again.This has been taken from rollup/plugins#186
The issue lies likely in how caching is handled in watch mode. The cache is only updated when a build completes successfully. When a module errors however, it should be evicted from the cache so that subsequent builds run it again. To solve this, maybe rollup can attach the cache to errors (similar to how
watchFiles
are added at the moment). Other options could be explored as well.I do not think it is prudent to evict the entire cache on errors as this will mean a rebuild after an error will be unnecessarily slow while the user might be interested in a quick fix.
Instead of evicting erroring modules, we could also provide plugins with the option to manually evict modules from the cache. Still, the updated cache would need to be passed down to the caller of rollup.watch somehow.
The text was updated successfully, but these errors were encountered: