You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With getStaticPaths, next build builds the wrong data files when using splat parameters [...params].
To Reproduce
Inside this route /foo/[...chunks]/index.js write the following:
exportconstunstable_getStaticPaths=async()=>{return[{params: {chunks: ['a','b']}},]}exportconstunstable_getStaticProps=async({params: { chunks }})=>{// do stuff with chunks}// your page component
When running next build the data file created is:
_next/data/XXXX/foo/a%2Fb.json
while it should have been:
_next/data/XXXX/foo/a/b.json.
When browsing the site on ZEIT, the data file is ignored, and _next/data/XXXX/foo/a/b.json gets created instead.
System information
Version of Next.js: 9.2.1
The text was updated successfully, but these errors were encountered:
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
vercel
locked as resolved and limited conversation to collaborators
Jan 30, 2022
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Bug report
Describe the bug
With
getStaticPaths
,next build
builds the wrong data files when using splat parameters[...params]
.To Reproduce
Inside this route
/foo/[...chunks]/index.js
write the following:When running
next build
the data file created is:_next/data/XXXX/foo/a%2Fb.json
while it should have been:
_next/data/XXXX/foo/a/b.json
.When browsing the site on ZEIT, the data file is ignored, and
_next/data/XXXX/foo/a/b.json
gets created instead.System information
The text was updated successfully, but these errors were encountered: