-
Notifications
You must be signed in to change notification settings - Fork 26.1k
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
Add support for exportPathMap in development #4094
Add support for exportPathMap in development #4094
Conversation
I'm not sure about the functionality of this. Is this a core alternative to Functionality wise I like this. The problem is the name of the routeMap It might be also great, if we can do this via a plugin. |
It's not.
This change is specifically to make development of static sites better, since previously users would run into the issue that they'd have to add a custom server to develop a static site, which doesn't make sense. |
Ah cool. Then this will be great. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great.
Try to add comment in the place I shown below.
server/index.js
Outdated
@@ -303,9 +303,20 @@ export default class Server { | |||
} | |||
|
|||
if (this.nextConfig.useFileSystemPublicRoutes) { | |||
if (this.dev && this.nextConfig.exportPathMap) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we add a comment on why we are doing this?
@timneutkens awesome. |
Paths defined in exportPathMap now work in development.
Makes https://github.com/zeit/next.js/wiki/Centralizing-Routing obsolete.