-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
fix(kit,nuxt): use reverseResolveAlias
for better errors
#32853
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
|
WalkthroughThe changes across multiple files primarily standardise how file paths are represented in warning and error messages throughout the codebase. The previous approach, which used relative filesystem paths, has been replaced by a new utility function, Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (8)
🧰 Additional context used📓 Path-based instructions (1)**/*.{ts,tsx}📄 CodeRabbit Inference Engine (.github/copilot-instructions.md)
Files:
🧠 Learnings (7)📓 Common learnings
📚 Learning: in `packages/nuxt/src/components/plugins/loader.ts`, the references to `resolve` and `distdir` are l...
Applied to files:
📚 Learning: in `packages/nuxt/src/app/components/nuxt-root.vue`, when optimizing bundle size by conditionally im...
Applied to files:
📚 Learning: ensure that ai-generated summaries accurately reflect the key changes in the pr, focusing on notable...
Applied to files:
📚 Learning: in nuxt, using `rolldownversion` (not `rollupversion`) is intentional when detecting if rolldown-vit...
Applied to files:
📚 Learning: applies to **/*.vue : use `<script setup lang="ts">` and the composition api when creating vue compo...
Applied to files:
📚 Learning: in `packages/kit/src/template.ts`, when updating the `extension_re` regular expression for typescrip...
Applied to files:
⏰ 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). (2)
🔇 Additional comments (18)
✨ 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. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
WalkthroughThis set of changes standardises the way file paths are displayed in warning and error messages across several Nuxt core and plugin files. The primary update is the introduction of a new utility function, Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (8)
🧰 Additional context used📓 Path-based instructions (1)**/*.{ts,tsx}📄 CodeRabbit Inference Engine (.github/copilot-instructions.md)
Files:
🧠 Learnings (8)📓 Common learnings
📚 Learning: in `packages/nuxt/src/components/plugins/loader.ts`, the references to `resolve` and `distdir` are l...
Applied to files:
📚 Learning: in `packages/nuxt/src/app/components/nuxt-root.vue`, when optimizing bundle size by conditionally im...
Applied to files:
📚 Learning: ensure that ai-generated summaries accurately reflect the key changes in the pr, focusing on notable...
Applied to files:
📚 Learning: applies to **/*.vue : use `<script setup lang="ts">` and the composition api when creating vue compo...
Applied to files:
📚 Learning: in nuxt, using `rolldownversion` (not `rollupversion`) is intentional when detecting if rolldown-vit...
Applied to files:
📚 Learning: applies to **/*.{ts,tsx} : follow standard typescript conventions and best practices...
Applied to files:
📚 Learning: in `packages/kit/src/template.ts`, when updating the `extension_re` regular expression for typescrip...
Applied to files:
🧬 Code Graph Analysis (4)packages/nuxt/src/core/app.ts (1)
packages/nuxt/src/imports/module.ts (1)
packages/nuxt/src/components/scan.ts (1)
packages/nuxt/src/pages/module.ts (2)
🔇 Additional comments (24)
✨ 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. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@nuxt/kit
nuxt
@nuxt/rspack-builder
@nuxt/schema
@nuxt/vite-builder
@nuxt/webpack-builder
commit: |
CodSpeed Performance ReportMerging #32853 will not alter performanceComparing Summary
|
|
||
export function resolveToAlias (path: string, nuxt = tryUseNuxt()) { | ||
return reverseResolveAlias(path, { ...nuxt?.options.alias || {}, ...strippedAtAliases }).pop() || path | ||
} | ||
|
||
const strippedAtAliases = { | ||
'@': '', | ||
'@@': '', | ||
} |
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.
wouldn't it be better to put this into packages/kit/src/resolve.ts
?
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.
you're thinking of creating + exposing a new utility? good idea - we can refactor this in the next minor to add a new export ...
🔗 Linked issue
📚 Description
this PR updates a number of places where we hard-code
~/${somePath}
for more consistency and fixes bugs resolving paths that have a more precise path (such as in layers)