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

fix: use static params in file-system based router for ssg #83

Merged
merged 2 commits into from
Dec 4, 2024

Conversation

lazarv
Copy link
Owner

@lazarv lazarv commented Dec 4, 2024

Implements static parameters support in the file-system based router and validates input parameters for static routes at static-site generation phase of an application build. Converts static parameters defined in a .static.{ts,mjs,json} to SSG compatible format.

Static parameters exported as default:

// /posts/[id].static.ts
export default [{ id: 1 }, { id: 2 }, { id: 3 }]

Converted to the default format used in exports of configuration in a react-server.config.mjs:

[{ path: "/posts/1" }, { path: "/posts/2" }, { path: "/posts/3" }]

#81

@lazarv lazarv merged commit 61cbefd into main Dec 4, 2024
7 checks passed
@lazarv lazarv deleted the fix/ssg-static-params branch December 4, 2024 21:28
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.

1 participant