fix(build): watch mode - replace rollup.watch with chokidar#3145
fix(build): watch mode - replace rollup.watch with chokidar#3145stafyniaksacha wants to merge 7 commits intovitejs:mainfrom
rollup.watch with chokidar#3145Conversation
|
About the breaking change, could we still accept rollup watch options and issue a deprecation warning? watch?: WatcherOptions | WatchOptions | null // WatcherOptions is deprecatedI think we could release this as a minor if we do this without breaking user setups. |
rollup.watch with chokidarrollup.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.watchcomes 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.watchwith a customchokidarthat 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).