docs: correct dynamic call to writeModule example#11650
Conversation
✅ Deploy Preview for rspack ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull Request Overview
This PR corrects the documentation for the VirtualModulesPlugin's writeModule API by updating the example to use the correct compiler hook and adding a note explaining the timing restrictions.
- Updated the dynamic module creation example to use
thisCompilationhook instead ofbeforeCompile - Added explanatory note about when
writeModulecan be safely called - Applied the same changes to both English and Chinese documentation
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| website/docs/zh/plugins/rspack/virtual-modules-plugin.mdx | Updated Chinese documentation with correct hook usage and timing explanation |
| website/docs/en/plugins/rspack/virtual-modules-plugin.mdx | Updated English documentation with correct hook usage and timing explanation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback". |
|
LGTM 👍 |
Summary
Built in VirtualModulesPlugin's
writeModuleAPI can't be invoked to early.close #11599
Related links
Checklist