Skip to content
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

Not working properly with Next.js Route Group #186

Open
1 of 3 tasks
MorookaKotaro opened this issue Dec 19, 2023 · 0 comments · May be fixed by #187
Open
1 of 3 tasks

Not working properly with Next.js Route Group #186

MorookaKotaro opened this issue Dec 19, 2023 · 0 comments · May be fixed by #187

Comments

@MorookaKotaro
Copy link

Description

When configuring the following directory structure in the app router, the object keys in $path.ts conflict. (An object literal cannot have multiple properties with the same name.)

└── app/
    ├── (withHeader)/
    │   ├── layout.tsx
    │   └── items/
    │       └── page.tsx
    └── items/
        └── [itemId]/
            └── page.tsx

Environment

  • Package version: v0.22.0
  • OS:
    • Linux
    • Windows
    • macOS
  • Node.js version: v20.8.0
  • npm version: v10.1.0

Additional context

output

  "items": {
    $url: (url?: { hash?: string }) => ({ pathname: '/items' as const, hash: url?.hash, path: `/items${buildSuffix(url)}` })
  },
  "items": {
    _itemId: (itemId: string | number) => ({
      $url: (url?: { hash?: string }) => ({ pathname: '/items/[itemId]' as const, query: { itemId }, hash: url?.hash, path: `/items/${itemId}${buildSuffix(url)}` })
    })
  },
@yskoht yskoht linked a pull request Apr 7, 2024 that will close this issue
4 tasks
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 a pull request may close this issue.

1 participant