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
watch function based config #4037
Comments
I see this as slightly problematic as this would mean re-creating all plugin instances on each run. This might make it hard to do any kind of watch optimizations in plugins. In any case, this could potentially cause quite a bit of churn in the plugin eco system of which I would be wary. |
I understand the perf issues around this, however a cache solution as mentioned would easily circumvent that. I'll give also, found a minor bug: #4038 |
Attempting to use |
@lukastaegert any other suggestions? I would essentially just want to re-invoke reloadConfigFile anytime there was a |
The effect you want would be nearly identical to just running Rollup without watch on every change. Because no caching is possible if the configuration file, especially plugins, change. We can look if it is possible to simulate a changed config file on every update, but essentially you are preventing any of Rollup's watch optimizations. Until then, an external watcher that triggers Rollup could have the same effect. |
Feature Use Case
using a
rollup.config.js
that exports a function (love this feature), I have async logic that generates meta information based on local/external endpoints that is eventually provided to a plugin.Feature Proposal
when using
watch
flag, the function that generates the rollup configuration(s) ideally would run again, since the results are potentially different based on the change detected.babel does something similar, and to combat performance issues exposes a cache feature exposed by an argument passed to the function itself. for backwards compatibility, the default cache could be set to the equivalent of "forever".
The text was updated successfully, but these errors were encountered: