Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Watching stops working after adding this plugin #59

Closed
prantlf opened this issue Aug 5, 2024 · 1 comment
Closed

Watching stops working after adding this plugin #59

prantlf opened this issue Aug 5, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@prantlf
Copy link

prantlf commented Aug 5, 2024

Describe the bug

Watching source file appears to stop working, once this plugin is enabled.

The rollup 4 migration guide mentions:

Another important change is that Rollup watch mode will no longer watch ids of files that have been loaded via a plugin load hook. So this mainly affects "virtual" files, where it really does not make sense to watch a hard drive location for changes. Instead, it is now up to plugins that use a load hook to manually call this.addWatchFile() for all the files they depend on to handle the load hook.

This plugin should be updated to call addWatchFile in the load method.

To Reproduce

Run rollup -cw and try modifying sources. The project rebuild won't kick in.

Expected behavior

When a source file is modified, the output has to be rebuilt automatically, if rollup is launched in the watch mode.

Environment

  • Package Version: 0.3.0
  • Node.js Version: 20.15.1
  • NPM Version: 10.7.0
  • Operating System: macOS Sonoma 14.5 (23F79)
@prantlf prantlf added the bug Something isn't working label Aug 5, 2024
prantlf added a commit to prantlf/rollup-plugin-sourcemaps2 that referenced this issue Aug 5, 2024
Plugins have to call `addWatchFile` now.

Attempts to fix 2wce#59.
prantlf added a commit to prantlf/rollup-plugin-sourcemaps2 that referenced this issue Aug 5, 2024
Plugins have to call `addWatchFile` now.

See 2wce#59.
@2wce
Copy link
Owner

2wce commented Aug 10, 2024

thank you @prantlf for reporting this, i've pushed a fix in the new version let me know if this unblocks you

@2wce 2wce closed this as completed Aug 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants