You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
docs: clarify buildEnd timing in Vite dev and webpack watch mode - #642
The Supported Hooks table lists buildEnd for both Vite and webpack, but the hook runs at different points in their development lifecycles.
This PR adds a short note to clarify the difference: in Vite dev mode, buildEnd runs when the development server closes, while in webpack it runs during compilation, including rebuilds in watch mode. It also links to the Bundler-Specific Logic section for plugins that need to handle these differences.
This is a documentation-only change with no runtime modifications.
Verification
Vite 8.3.5: Verified locally in middleware mode — buildEnd was not called after module transforms and ran once when server.close() was called.
webpack 5.112.2: Verified locally with compiler.watch() — buildEnd ran once on the initial compilation and once on rebuild, with no additional calls when closing the watcher and compiler.
Checks: On November 11, Markdown ESLint, pnpm typecheck, pnpm build, and pnpm test:unit (273 passed, 62 skipped) passed on this patch at 5daf6e6. On November 13, the patch applied cleanly to the same base and git diff --check passed. The full test suite and documentation site build were not run locally.
Summary by CodeRabbit
Documentation
Clarified when buildEnd runs during Vite and webpack builds, including watch-mode rebuilds.
Added guidance for handling cleanup tied to a specific bundler lifecycle.
No actionable comments were generated in the recent review.
Walkthrough
The Supported Hooks documentation now describes when buildEnd runs in Vite and webpack. It links to Bundler-Specific Logic for cleanup tied to a bundler lifecycle.
Changes: Hook lifecycle documentation
Layer / File(s)
Summary
Document buildEnd timing docs/guide/index.md
The documentation describes buildEnd timing in Vite dev mode and webpack, including watch-mode rebuilds. It links to Bundler-Specific Logic for bundler-specific cleanup.
This documentation-only change clarifies when buildEnd runs in Vite and webpack. It has no runtime impact and is ready to merge.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title names the main change: clarifying in the docs when buildEnd runs in Vite dev servers and webpack watch mode. The raw summary and PR objectives both describe a documentation-only change that …
Linked Issues check
Issue #569 asks whether the different buildEnd timing in Vite and webpack should be handled with new hooks or documented. It sets no formal acceptance criteria. The PR chooses documentation. At the …
Out of Scope Changes check
The PR changes only the Supported Hooks documentation in docs/guide/index.md, with four added lines per the supplied summary. The added note states the buildEnd timing difference that #569 describes…
Full details: Title check
Explanation
The title names the main change: clarifying in the docs when buildEnd runs in Vite dev servers and webpack watch mode. The raw summary and PR objectives both describe a documentation-only change that adds a note on this timing, so the title matches the changeset.
Full details: Linked Issues check
Explanation
Issue #569 asks whether the different buildEnd timing in Vite and webpack should be handled with new hooks or documented. It sets no formal acceptance criteria. The PR chooses documentation. At the reviewed head, docs/guide/index.md states after the Supported Hooks table that in Vite dev mode buildEnd runs when the dev server closes, and in webpack it runs during compilation, including watch-mode rebuilds. It links to the existing ## Bundler-Specific Logic section. This meets the documentation objective. The diff tool was unavailable, so the base content was not compared line by line. The file read at head and the supplied summary (+4/-0, docs only) support this result. No coding requirements remain open.
Full details: Out of Scope Changes check
Explanation
The PR changes only the Supported Hooks documentation in docs/guide/index.md, with four added lines per the supplied summary. The added note states the buildEnd timing difference that #569 describes. It also links to the Bundler-Specific Logic section. The PR describes no runtime or API changes, and the summary reports no declaration changes. The diff tool was unavailable, so the absence of other changed files rests on the supplied summary and not on a full diff read.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: defaults
Review profile: CHILL
Plan: Advanced
Run ID: 4f3fc751-73ff-4e19-b8bb-119e7ad6fa69
Commits
Reviewing files that changed from the base of the PR and between 5daf6e6 and d19c69f.
Files selected for processing: 1
docs/guide/index.md
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
resolves #569
The Supported Hooks table lists
buildEndfor both Vite and webpack, but the hook runs at different points in their development lifecycles.This PR adds a short note to clarify the difference: in Vite dev mode,
buildEndruns when the development server closes, while in webpack it runs during compilation, including rebuilds in watch mode. It also links to theBundler-Specific Logicsection for plugins that need to handle these differences.This is a documentation-only change with no runtime modifications.
Verification
buildEndwas not called after module transforms and ran once whenserver.close()was called.compiler.watch()—buildEndran once on the initial compilation and once on rebuild, with no additional calls when closing the watcher and compiler.pnpm typecheck,pnpm build, andpnpm test:unit(273 passed, 62 skipped) passed on this patch at5daf6e6. On November 13, the patch applied cleanly to the same base andgit diff --checkpassed. The full test suite and documentation site build were not run locally.Summary by CodeRabbit
buildEndruns during Vite and webpack builds, including watch-mode rebuilds.