-
Notifications
You must be signed in to change notification settings - Fork 699
Description
This's a UB in Rollup. There's no way to only create a
bundlein rollup without triggering thebuildStarthook. For API likerollup(..)/watch(..), build stage hooks will surely be executed.So for rollup, the quesion that "should we trigger
closeBundlehook if there's no build/bundle happens" doesn't exist in the rollup world.Notice:
Bundler, unlikeClassicBundler, is designed forwatch/devmode.I thought about making close bundle a bundler level hook, but it requires some significant change. Like
this.resolvewill be forbidden withcloseBundle, though nobody use it this way.Originally posted by @hyf0 in #6891 (comment)
Actually this also brings up question about how we gonna handle this in
ClassicBundler?"should we trigger closeBundle hook if there's no build/bundle happens"
Currently if you write
(await rolldown(..)).close()
closeBundlewon't triggered in rolldown, while rollup will.
last_bundle_context: Option<BundleContext>,
Originally posted by @hyf0 in #6891 (comment)
We need to decide what to do for the first one and also document it (and fix the implementation if needed).