-
-
Notifications
You must be signed in to change notification settings - Fork 6k
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
fix(build): watch mode - replace rollup.watch
with chokidar
#3145
Conversation
About the breaking change, could we still accept rollup watch options and issue a deprecation warning? watch?: WatcherOptions | WatchOptions | null // WatcherOptions is deprecated I think we could release this as a minor if we do this without breaking user setups. |
rollup.watch
with chokidar
rollup.watch
with chokidar
Should be ok now |
I don't think it is a better fix, the rollup watch build will cache module transform result and other perfmance optimized. This fix will lost the optimzied of rollup. I think we should found the reason with issue then fixed them. |
I think additional implementation of watch mode may bring other issues like affect |
@stafyniaksacha we discussed this with Evan about this approach, and @underfin has a point here. We should try to use rollup watch mode as in your original PR, as there are performance benefits. A few bugs were solved already by #3512 and related PRs. The plugin caches were not reset when rebuilding. |
Description
Using
rollup.watch
comes with some leaks: we can not watch for configuration changes neither control what is built.This is an alternative approach that replace the use of
rollup.watch
with a customchokidar
that trigger internalbuild
(so we can not have different behaviour while using the watch option)Caveat:
This comes with a breaking change in the watcher configuration from
RollupWatcher
(rollup) toWatchOptions
(chokidar)Fix #3108
Fix #3068
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).