We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
the setting in next.config.mjs is not take effect: the issue is affect the version from 3.16-3.17.x
async rewrites() { return [ { source: '/api/v1/ai/user-works/:path', destination: '/api/user-works/:path', }, ] }
https://github.com/smoothdvd/payloadcms-nextjs-rewrites-issue
import { withPayload } from '@payloadcms/next/withPayload' /** @type {import('next').NextConfig} */ const nextConfig = { // Your Next.js config here async rewrites() { return [ { source: '/api/v1/ai/user-works/:path*', destination: '/api/user-works/:path*', }, ] } } export default withPayload(nextConfig)
curl http://localhost:3000/api/v1/ai/user-works {"message":"Route not found \"/api/v1/ai/user-works\""}
area: core
Binaries: Node: 20.18.1 npm: 10.8.2 Yarn: 1.22.22 pnpm: 9.15.0 Relevant Packages: payload: 3.17.1 next: 15.1.0 @payloadcms/email-nodemailer: 3.17.1 @payloadcms/graphql: 3.17.1 @payloadcms/next/utilities: 3.17.1 @payloadcms/payload-cloud: 3.17.1 @payloadcms/richtext-lexical: 3.17.1 @payloadcms/translations: 3.17.1 @payloadcms/ui/shared: 3.17.1 react: 19.0.0 react-dom: 19.0.0 Operating System: Platform: linux Arch: x64 Version: #26~22.04.1-Ubuntu SMP Thu Jul 11 22:33:04 UTC 2024 Available memory (MB): 7930 Available CPU cores: 2
The text was updated successfully, but these errors were encountered:
c0ae994
🚀 This is included in version v3.19.0
Sorry, something went wrong.
r1tsuu
Successfully merging a pull request may close this issue.
Describe the Bug
the setting in next.config.mjs is not take effect:
the issue is affect the version from 3.16-3.17.x
Link to the code that reproduces this issue
https://github.com/smoothdvd/payloadcms-nextjs-rewrites-issue
Reproduction Steps
Which area(s) are affected? (Select all that apply)
area: core
Environment Info
The text was updated successfully, but these errors were encountered: