-
Notifications
You must be signed in to change notification settings - Fork 29.9k
Closed
Description
Feature request
Is your feature request related to a problem? Please describe.
Next.js v9.0.0 hard codes the route name of the API path: /api/.
In Material-UI, we host pages under the /api/ folder. For instance: https://v3.material-ui.com/api/app-bar/. It forces us to rename this folder. This has an SEO impact.
Describe the solution you'd like
We would be interested in having an option to configure this path. For instance, I could imagine something like:
next.config.js
module.exports = {
apiRoutePath: 'json-api',
};Additional context
- The related thread on our side: [docs] Rename the /api/ folder mui/material-ui#16752
- I had an initial discussion about the problem with @timneutkens on Twitter.
- It seems relatively simple to implement as we have access to the config here:
https://github.com/zeit/next.js/blob/71f9288a54c32420a18a07035ea7a73c9c3c50e5/packages/next/build/entries.ts#L51
bylek, coox, oliviertassinari, freysie, jlobos and 3 more
Metadata
Metadata
Assignees
Labels
No labels