-
-
Notifications
You must be signed in to change notification settings - Fork 595
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
Rollup plugin URL should use the emitFile API #489
Comments
We'd be happy to review a PR to resolve this. |
It’s under investigation 😉 |
Hey folks. This issue hasn't received any traction for 60 days, so we're going to close this for housekeeping. If this is still an ongoing issue, please do consider contributing a Pull Request to resolve it. Further discussion is always welcome even with the issue closed. If anything actionable is posted in the comments, we'll consider reopening it. ⓘ |
@bastienrobert can we reopen this? I also believe this is an issue |
@adamzerella The bot's message looks clear to me - this requires community resolution, and none was provided, so the issue was stale and closed. The same will happen to the new issue you opened if no one steps up to help resolve it. |
I can see why this issue went stale. I was considering a PR, but this plugin does much more than just emit assets. This plugin has a lot of customization options that make a conversion more complex: It seems that the design of this plugin allows for a dest folder outside of the Rollup dest dir. It can be configured to break watch mode by outputting to a folder that Rollup is watching. Is this something we want to allow? This plugin uses a node stream to copy the files. It's the most memory efficient way to do it, and to use the emitFile API would require the files to be loaded into memory. Probably not desirable. All in all, I think a new plugin without the extra options would be better for the most common use cases. Maybe |
I second the issue. I'm guessing not using the |
@rollup/plugin-url
Expected Behavior / Situation
It should use the emitFile API to prevent watch to infinitely loop.
Actual Behavior / Situation
Actually, the plugin is using
FS
and is writing to the disk which causes the file watcher to trigger a rebuild.I think it'll be great to update the doc to specify it's a bad practice (https://rollupjs.org/guide/en/#thisemitfileemittedfile-emittedchunk--emittedasset--string).
Modification Proposal
The text was updated successfully, but these errors were encountered: