-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
fix(nuxt): use joinURL when remote island is provided #32772
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: |
WalkthroughThe changes update the URL construction logic in the Nuxt Island component by replacing the use of the URL constructor with the joinURL utility when generating fetch URLs for remote component islands. This affects how URLs are assembled when a source prop is provided. In the test suite, a new test is added to verify correct URL handling with a base path, and existing client component tests are modified to remove data-island-uid attributes from HTML snapshots using a newly introduced helper function. The helper function is appended to the test file, and snapshots are updated accordingly. Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🧰 Additional context used📓 Path-based instructions (2)**/*.{ts,tsx}📄 CodeRabbit Inference Engine (.github/copilot-instructions.md)
Files:
**/*.{test,spec}.{ts,tsx,js,jsx}📄 CodeRabbit Inference Engine (.github/copilot-instructions.md)
Files:
🧠 Learnings (3)📓 Common learnings
packages/nuxt/src/app/components/nuxt-island.ts (2)Learnt from: huang-julien const IsolatedPage = route?.meta?.isolate ? defineAsyncComponent(() => import('#build/isolated-page.mjs')) : null instead of wrapping the import in a computed property or importing the component unconditionally. Learnt from: GalacticHypernova test/nuxt/nuxt-island.test.ts (4)Learnt from: Tofandel Learnt from: CR Learnt from: huang-julien const IsolatedPage = route?.meta?.isolate ? defineAsyncComponent(() => import('#build/isolated-page.mjs')) : null instead of wrapping the import in a computed property or importing the component unconditionally. Learnt from: CR ⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
🔇 Additional comments (4)
✨ Finishing Touches
🧪 Generate unit tests
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 (
|
CodSpeed Performance ReportMerging #32772 will not alter performanceComparing Summary
Footnotes |
does this also resolve #32751? |
🔗 Linked issue
fix #32637
📚 Description
This PR makes nuxtisland use joinURL instead of cosntructing the URL with new URL which removes any base path from the provided remote source