-
Notifications
You must be signed in to change notification settings - Fork 232
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
Migration steps for nextjs inbuilt routing #350
Comments
You can use the next js rewrites in your // next.config.json
// Existing routes configured with next-routes
const routes = require("./your-next-routes")
// Map the routes to the below shape
// routes = [{ source: '/about', destination: '/' }]
module.exports = {
async rewrites() {
return [...routes]
}
} In your // server.js
const handle = app.getRequestHandler();
server.get("*", (req, res) => {
return handle(req, res);
}); Might have to delete the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Are there any easy migration step to migrate to inbuilt nextjs routing
The text was updated successfully, but these errors were encountered: