-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
docs: add docs for moduleDependencies
#33499
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
Conversation
|
|
WalkthroughDocumentation updates to introduce and explain the new Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Rationale: Pure documentation changes across two related files following a consistent pattern. Changes are homogeneous—both files document the same feature transition with similar examples and structure. No implementation logic, runtime behaviour, or type definitions to verify; reviewers need only confirm documentation clarity, example correctness, and consistency between guide and API reference sections. Pre-merge checks and finishing touches✅ Passed checks (4 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
docs/3.api/5.kit/1.modules.md (1)
65-65: Minor grammar improvement in table description. The description "Can be an object or a function..." would read more clearly as "Either an object or a function...". This is a minor style point; the current phrasing is acceptable in table context.Consider applying this diff:
-| `moduleDependencies` | `Record<string, ModuleDependency> \| ((nuxt: Nuxt) => Record<string, ModuleDependency>)`{lang="ts"} | `false` | Dependencies on other modules with version constraints and configuration. Can be an object or a function that receives the Nuxt instance. See [example](#specifying-module-dependencies). | +| `moduleDependencies` | `Record<string, ModuleDependency> \| ((nuxt: Nuxt) => Record<string, ModuleDependency>)`{lang="ts"} | `false` | Dependencies on other modules with version constraints and configuration. Either an object or a function that receives the Nuxt instance. See [example](#specifying-module-dependencies). |
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
docs/2.guide/3.going-further/3.modules.md(1 hunks)docs/3.api/5.kit/1.modules.md(3 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/3.api/5.kit/1.modules.md
[uncategorized] ~11-~11: Possible missing article found.
Context: ...odules are the building blocks of Nuxt. Kit provides a set of utilities to help you...
(AI_HYDRA_LEO_MISSING_THE)
[style] ~65-~65: To form a complete sentence, be sure to include a subject or ‘there’.
Context: ... version constraints and configuration. Can be an object or a function that receive...
(MISSING_IT_THERE)
[uncategorized] ~325-~325: Loose punctuation mark.
Context: ...alized }, }) ``` ## installModule ::callout{type="warning"} Deprecated:...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~327-~327: Loose punctuation mark.
Context: ...come non-blocking) in a future version. :: Install specified Nuxt module program...
(UNLIKELY_OPENING_PUNCTUATION)
docs/2.guide/3.going-further/3.modules.md
[uncategorized] ~544-~544: Loose punctuation mark.
Context: ...ntime/assets/styles.css')) }, }) ``` ::callout{type="info"} The `moduleDepende...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~546-~546: Loose punctuation mark.
Context: ... setup order and configuration merging. :: #### Using Hooks [Lifecycle hooks](/...
(UNLIKELY_OPENING_PUNCTUATION)
🔇 Additional comments (5)
docs/3.api/5.kit/1.modules.md (3)
11-11: Well-integrated introduction tomoduleDependencies. The reference naturally introduces the new feature alongside existing module utilities.
243-322: Excellent comprehensive examples formoduleDependencies. Both static and dynamic approaches are thoroughly documented with clear comments explaining version constraints, configuration overrides, defaults, and optional dependency handling. The function-based example with conditional logic is particularly helpful for real-world scenarios.
326-328: Clear and actionable deprecation notice. The warning effectively communicates the shift tomoduleDependenciesand directs developers to relevant examples.docs/2.guide/3.going-further/3.modules.md (2)
504-542: Well-structured example demonstrating the newmoduleDependenciespattern. The example effectively shows version constraints, configuration merging (overrides and defaults), and resolver-based asset injection. The pattern is clearer and more maintainable than the previousinstallModuleapproach.
545-547: Effective reinforcement of best practices. The informational callout succinctly communicates the key benefits ofmoduleDependenciesover the deprecated approach.
🔗 Linked issue
closes #33497
📚 Description
this adds some missing docs for the moduleDependencies feature (#33063)