-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
docs: update v4 docs with new folder structure #32348
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
|
@nuxt/kit
nuxt
@nuxt/rspack-builder
@nuxt/schema
@nuxt/vite-builder
@nuxt/webpack-builder
commit: |
CodSpeed Performance ReportMerging #32348 will not alter performanceComparing Summary
|
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.
Pull Request Overview
This PR updates the documentation to reflect the new Nuxt 4 folder structure. It revises file paths and examples across multiple docs files to remove the "app/" prefix from router options and SPA loading template references, and clarifies the alias mapping in the upgrade guide.
- Removed "app/" prefixes from router.options.ts paths and updated related examples
- Updated SPA loading template paths from "
/app/spa-loading-template.html" to "/spa-loading-template.html" - Revised directory structure examples and upgrade instructions to match the new folder layout
Reviewed Changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
docs/7.migration/7.component-options.md | Updated scrollToTop instructions to point to the new router.options.ts path |
docs/3.api/6.nuxt-config.md | Refined default paths and examples to reflect the new folder structure |
docs/3.api/3.utils/define-page-meta.md | Adjusted the router.options.ts reference in the guidance |
docs/2.guide/4.recipes/1.custom-routing.md | Replaced "app/router.options.ts" with "router.options.ts" throughout |
docs/2.guide/3.going-further/1.experimental-features.md | Updated the SPA loading template path to the new structure |
docs/2.guide/2.directory-structure/1.app/1.pages.md | Modified navigation note to reference the updated router.options.ts path |
docs/2.guide/2.directory-structure/1.app/.navigation.yml | New navigation file reflecting the directory section changes |
docs/2.guide/1.concepts/3.rendering.md | Revised SPA loading template note to indicate the new file path |
docs/1.getting-started/18.upgrade.md | Clarified alias mapping and file structure changes in the upgrade instructions |
docs/1.getting-started/10.data-fetching.md | Changed a conditional check from "data == null" to "data == undefined" in a Vue template |
Comments suppressed due to low confidence (1)
docs/1.getting-started/10.data-fetching.md:44
- Consider retaining the check using 'data == null' since it handles both null and undefined values. If the change to 'undefined' is intentional, please confirm that it aligns with the desired logic.
<div v-if="data == undefined">
WalkthroughThe changes primarily update documentation across several files to reflect adjustments in file paths, naming conventions, and default directory structures for Nuxt 4. References to the SPA loading template file path have been corrected from ✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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 (4)
docs/1.getting-started/10.data-fetching.md (1)
44-44
: Prefer strict undefined check
Using=== undefined
is clearer and avoids unintended type coercion.Consider updating as follows:
- <div v-if="data == undefined"> + <div v-if="data === undefined">docs/3.api/6.nuxt-config.md (3)
1905-1905
: Grammar: include definite article
Missing "the" before "file" in the bullet.- - If it is unset, it will use `~/spa-loading-template.html` file in one of your layers, if it exists. + - If it is unset, it will use the `~/spa-loading-template.html` file in one of your layers, if it exists.🧰 Tools
🪛 LanguageTool
[uncategorized] ~1905-
1905: You might be missing the article “the” here./spa-loading-template.html` file in one...
Context: ... false. - If it is unset, it will use
(AI_EN_LECTOR_MISSING_DETERMINER_THE)
1911-1911
: Wrap example path in code ticks
Enhance readability by formatting the path as inline code.- **Example**: ~/spa-loading-template.html + **Example**: `~/spa-loading-template.html`
1967-1967
: ConsistentsrcDir
example
Remove trailing slash to align with default value.- srcDir: 'app/' + srcDir: 'app'
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (12)
docs/1.getting-started/10.data-fetching.md
(1 hunks)docs/1.getting-started/18.upgrade.md
(3 hunks)docs/2.guide/1.concepts/3.rendering.md
(1 hunks)docs/2.guide/2.directory-structure/1.app/.navigation.yml
(1 hunks)docs/2.guide/2.directory-structure/1.app/1.pages.md
(1 hunks)docs/2.guide/3.going-further/1.experimental-features.md
(1 hunks)docs/2.guide/4.recipes/1.custom-routing.md
(4 hunks)docs/3.api/3.utils/define-page-meta.md
(1 hunks)docs/3.api/6.nuxt-config.md
(3 hunks)docs/7.migration/7.component-options.md
(1 hunks)packages/schema/src/config/app.ts
(1 hunks)packages/schema/src/types/schema.ts
(2 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/2.guide/1.concepts/3.rendering.md
[uncategorized] ~91-~91: Loose punctuation mark.
Context: ...be rendered until your app is hydrated. :read-more{title="SPA Loading Template" t...
(UNLIKELY_OPENING_PUNCTUATION)
docs/2.guide/2.directory-structure/1.app/1.pages.md
[uncategorized] ~9-~9: Loose punctuation mark.
Context: ...custom-routing#using-approuteroptions). :: ## Usage Pages are Vue components an...
(UNLIKELY_OPENING_PUNCTUATION)
docs/3.api/6.nuxt-config.md
[uncategorized] ~1796-~1796: Loose punctuation mark.
Context: ...ou can use an router.options.ts
file. :: See: [Vue Router documentation](h...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~1905-1905: You might be missing the article “the” here./spa-loading-template.html` file in one...
Context: ... false. - If it is unset, it will use
(AI_EN_LECTOR_MISSING_DETERMINER_THE)
⏰ Context from checks skipped due to timeout of 90000ms (10)
- GitHub Check: test-fixtures (windows-latest, built, webpack, default, manifest-on, json, 20)
- GitHub Check: test-fixtures (windows-latest, built, webpack, default, manifest-on, json, 20)
- GitHub Check: test-fixtures (windows-latest, built, webpack, default, manifest-on, json, 20)
- GitHub Check: test-fixtures (windows-latest, built, webpack, default, manifest-on, json, 20)
- GitHub Check: test-fixtures (windows-latest, built, webpack, default, manifest-on, json, 20)
- GitHub Check: test-fixtures (windows-latest, built, webpack, default, manifest-on, json, 20)
- GitHub Check: test-fixtures (windows-latest, built, webpack, default, manifest-on, json, 20)
- GitHub Check: test-fixtures (windows-latest, built, webpack, default, manifest-on, json, 20)
- GitHub Check: test-fixtures (windows-latest, built, webpack, default, manifest-on, json, 20)
- GitHub Check: test-fixtures (windows-latest, built, webpack, default, manifest-on, json, 20)
🔇 Additional comments (17)
docs/2.guide/1.concepts/3.rendering.md (1)
91-91
: Path correction for SPA loading template
The update from~/app/spa-loading-template.html
to~/spa-loading-template.html
correctly reflects the new default alias.🧰 Tools
🪛 LanguageTool
[uncategorized] ~91-~91: Loose punctuation mark.
Context: ...be rendered until your app is hydrated. :read-more{title="SPA Loading Template" t...(UNLIKELY_OPENING_PUNCTUATION)
docs/2.guide/3.going-further/1.experimental-features.md (1)
457-457
: Update SPA loading template reference
Correctly points to~/spa-loading-template.html
instead of the obsolete path underapp/
.docs/3.api/3.utils/define-page-meta.md (1)
139-139
: Unify router options path reference
The path correctly reflects the new structure (~/router.options.ts
).docs/7.migration/7.component-options.md (1)
106-106
: Corrected scroll behaviour override path
The updated path~/router.options.ts
aligns with the revised directory conventions.docs/2.guide/2.directory-structure/1.app/1.pages.md (1)
9-9
: Consistent router options referenceThe link has been correctly updated to point at
router.options.ts
(dropping theapp/
prefix) in the custom‐routing guide, reflecting the new folder structure.🧰 Tools
🪛 LanguageTool
[uncategorized] ~9-~9: Loose punctuation mark.
Context: ...custom-routing#using-approuteroptions). :: ## Usage Pages are Vue components an...(UNLIKELY_OPENING_PUNCTUATION)
docs/2.guide/2.directory-structure/1.app/.navigation.yml (1)
1-5
: New navigation metadataThe added YAML defines the navigation for the "app" section—setting title, titleTemplate, head.title, defaultOpen and icon—aligning with the updated directory overview.
docs/2.guide/4.recipes/1.custom-routing.md (3)
16-29
: Unify router config filenameThe code block has been updated to use
router.options.ts
rather thanapp/router.options.ts
, matching the revised defaultapp/
directory alias.
112-114
: Update resolver pathAdjusted the resolver invocation to
./runtime/router-options
to correspond with the renamed router options file.
173-181
: Consistent router options exampleThe second example likewise now references
router.options.ts
for the custom history configuration, ensuring uniform names across all examples.packages/schema/src/config/app.ts (1)
301-307
: Correct SPA loading template pathDocumentation comments now refer to
~/spa-loading-template.html
(without theapp/
prefix), in line with the new defaultsrcDir
mapping.packages/schema/src/types/schema.ts (2)
302-308
: Align SPA loading template exampleThe
spaLoadingTemplate
comment has been updated to use~/spa-loading-template.html
directly, removing any outdatedapp/
nesting in the example.
595-607
: UpdatesrcDir
example and structureRevised the
srcDir
default to'app/'
and flattened the directory tree to reflect the new standard layout underapp/
.docs/1.getting-started/18.upgrade.md (3)
191-193
: Verified updated alias note
Clarifies that~
now points toapp/
by default, in line with the newsrcDir
.
225-225
: Corrected comment for forcing v3 folder structure
The directive now accurately referencesrouter.options.ts
andspa-loading-template.html
without redundantapp/
prefix.
437-437
: Updated SPA loading template path
Adjusts old~/app/spa-loading-template.html
reference to the new~/spa-loading-template.html
, matching Nuxt 4 behaviour.docs/3.api/6.nuxt-config.md (2)
1796-1796
: Confirmed router options file reference
The note now correctly points users to a standalonerouter.options.ts
file for advanced configuration.🧰 Tools
🪛 LanguageTool
[uncategorized] ~1796-~1796: Loose punctuation mark.
Context: ...ou can use anrouter.options.ts
file. :: See: [Vue Router documentation](h...(UNLIKELY_OPENING_PUNCTUATION)
1962-1962
: Verified defaultsrcDir
description
Defaults correctly state"app"
for Nuxt 4 and"."
for Nuxt 3 compatibility.
🔗 Linked issue
resolves #32344
resolves #32345
📚 Description
this is a set of changes to update the docs to assume the new v4 folder structure - it will not be backported to the
3.x
branch