Skip to content

Hoist nextjs example lib/ and components/ out of app/#3811

Open
malewis5 wants to merge 1 commit into
Shopify:previewfrom
vercel-labs:mttlws/nextjs-hoist-lib-components
Open

Hoist nextjs example lib/ and components/ out of app/#3811
malewis5 wants to merge 1 commit into
Shopify:previewfrom
vercel-labs:mttlws/nextjs-hoist-lib-components

Conversation

@malewis5

Copy link
Copy Markdown

What

Moves the Next.js example's components/ and lib/ directories from under app/ to the project root, and replaces relative imports (../lib, ../../components, …) with the @/ path alias.

Why

Keeps non-route modules out of the app/ routing tree and gives the example stable, refactor-proof import paths.

Scope

Imports only, plus pure file moves — no behavior change. README and proxy.ts references updated to match.

Verification

  • tsc --noEmit
  • next build ✅ (all routes + proxy build)
  • Pre-existing lint warnings in effect bodies are unrelated and left untouched.

🤖 Generated with Claude Code

Move the Next.js example's components/ and lib/ directories from under
app/ to the project root, and replace relative imports with the @/ path
alias. No behavior change — imports only, plus pure file moves.

Verified: tsc --noEmit and next build both pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@benjaminsehl benjaminsehl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thought I saw this already implemented in the last PR but definitely prefer this pattern. Thanks.

@malewis5

Copy link
Copy Markdown
Author

Thought I saw this already implemented in the last PR but definitely prefer this pattern. Thanks.

I stacked 3810 on top of 3811 just to try and keep the commit history cleaner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants