-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
chore: use subpath imports instead of path aliases #7735
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
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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 all the import statements to use Node.js's native subpath imports instead of the legacy path aliases.
- Replaced all instances of "@/..." with "#..." to leverage native subpath imports.
- Updated test files, app routes, and documentation references consistently.
Reviewed Changes
Copilot reviewed 226 out of 226 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| apps/site/components/Blog/BlogPostCard/index.tsx | Updated blog card component import paths. |
| apps/site/components/Blog/BlogPostCard/tests/index.test.jsx | Updated blog post card test import paths. |
| apps/site/components/Blog/BlogHeader/index.tsx | Updated blog header import paths. |
| apps/site/components/Blog/BlogHeader/tests/index.test.jsx | Updated blog header test import paths. |
| apps/site/client-context.ts | Updated client context imports. |
| apps/site/app/sitemap.ts | Updated sitemap-related imports. |
| apps/site/app/global-error.tsx | Updated global error page component imports. |
| apps/site/app/[locale]/page.tsx | Updated page-level imports for client context, layout, and constants. |
| apps/site/app/[locale]/not-found.tsx | Updated not-found page component imports. |
| apps/site/app/[locale]/next-data/* | Updated various next-data route imports. |
| apps/site/app/[locale]/layout.tsx | Updated layout imports including fonts, theme provider, and styles. |
| apps/site/app/[locale]/feed/[feed]/route.ts | Updated imports for feed route. |
| apps/site/app/[locale]/error.tsx | Updated error page imports. |
| apps/site/app/[locale]/[...path]/page.tsx | Updated dynamic page imports for base page and constants. |
| COLLABORATOR_GUIDE.md | Updated documentation paths referring to release types. |
|
Lighthouse Results
|
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #7735 +/- ##
==========================================
- Coverage 74.84% 74.84% -0.01%
==========================================
Files 98 98
Lines 7888 7891 +3
Branches 200 200
==========================================
+ Hits 5904 5906 +2
- Misses 1983 1984 +1
Partials 1 1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Perhaps bikeshedding, but personally I would prefer |
|
I just tried that, assuming it would work, and it looks like |
|
I went with |
|
👍 That satisfies my brain -- I think I just didn't like the bare |
dario-piotrowicz
left a 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.
Looks good to me 🙂
bjohansebas
left a 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.
LGTM
Description
This PR uses Node.js's native subpath imports in place of the
tsconfig.jsonpaths, since these are natively supportedValidation
Nothing should change, everything should build and test correctly
Related Issues
Fixes #7732
Check List
pnpm formatto ensure the code follows the style guide.pnpm testto check if all tests are passing.pnpm buildto check if the website builds without errors.