-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
docs: mention autoimport resolveComponent only works with literal strings #31511
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
|
i think we could probably support string templates without interpolation maybe update this to indicate that the issue is that the string must be statically analysed? and i can create a pr to support templates |
Caution Review failedThe pull request is closed. WalkthroughThe documentation has been updated to clarify the usage of the 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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 (1)
docs/2.guide/2.directory-structure/1.components.md (1)
81-84
: Clarify Autoimport Limitations inresolveComponent
The newly added line in the ::important block clearly explains that autoimports only work with literal strings, which should help avoid confusion. However, consider a slight rephrasing for grammatical consistency. For example, you might change it to:
“Autoimports only work with literal strings and do not accept any operations or template strings withinresolveComponent
.”This minor adjustment could improve readability.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~83-~83: Loose punctuation mark.
Context: ...late strings withinresolveComponent
. :: ::tip{icon="i-lucide-video" to="https...(UNLIKELY_OPENING_PUNCTUATION)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/2.guide/2.directory-structure/1.components.md
(1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/2.guide/2.directory-structure/1.components.md
[uncategorized] ~83-~83: Loose punctuation mark.
Context: ...late strings within resolveComponent
. :: ::tip{icon="i-lucide-video" to="https...
(UNLIKELY_OPENING_PUNCTUATION)
🔇 Additional comments (1)
docs/2.guide/2.directory-structure/1.components.md (1)
92-99
: Review the Updated Global Components Configuration ExampleThe diff block now adds
global: true
anddirs: ['~/components']
to the components configuration in the Nuxt config snippet. This update appears to modernise the example by explicitly enabling global registration and specifying the directory for auto-imports. Please confirm that this example aligns with the current recommended practices and that any related documentation elsewhere reflects this update.
I don't really see the point of template string without any interpolation 🤔. Wouldn't handling it make the regex more complex (to read) ? it's already quite long |
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/2.guide/2.directory-structure/1.components.md (1)
81-84
: Documentation Clarity in theresolveComponent
Section:
The additional guidance is very helpful in clarifying that only literal strings should be provided toresolveComponent
. However, a minor grammatical improvement is suggested on line 83. The static analysis hint notes that adding the article “the” before “compilation step” would improve clarity. Consider applying the following change:- The string is statically analysed at compilation step. + The string is statically analysed at the compilation step.🧰 Tools
🪛 LanguageTool
[uncategorized] ~83-~83: You might be missing the article “the” here.
Context: ...e. The string is statically analyzed at compilation step. :: ::tip{icon="i-lucide-video" t...(AI_EN_LECTOR_MISSING_DETERMINER_THE)
[uncategorized] ~83-~83: Loose punctuation mark.
Context: ...tatically analyzed at compilation step. :: ::tip{icon="i-lucide-video" to="https...(UNLIKELY_OPENING_PUNCTUATION)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/2.guide/2.directory-structure/1.components.md
(1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/2.guide/2.directory-structure/1.components.md
[uncategorized] ~83-~83: You might be missing the article “the” here.
Context: ...e. The string is statically analyzed at compilation step. :: ::tip{icon="i-lucide-video" t...
(AI_EN_LECTOR_MISSING_DETERMINER_THE)
[uncategorized] ~83-~83: Loose punctuation mark.
Context: ...tatically analyzed at compilation step. :: ::tip{icon="i-lucide-video" to="https...
(UNLIKELY_OPENING_PUNCTUATION)
🔗 Linked issue
fix #31503
📚 Description
Docs are maybe not clear enough that autoimports only accept literal strings