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

Add support for exportPathMap in development #4094

Merged

Conversation

timneutkens
Copy link
Member

Paths defined in exportPathMap now work in development.
Makes https://github.com/zeit/next.js/wiki/Centralizing-Routing obsolete.

@arunoda
Copy link
Contributor

arunoda commented Apr 3, 2018

I'm not sure about the functionality of this. Is this a core alternative to next-routes?

Functionality wise I like this. The problem is the name of the routeMap exportPathMap. Since it's something we defined for next-export.

It might be also great, if we can do this via a plugin.

@timneutkens
Copy link
Member Author

I'm not sure about the functionality of this. Is this a core alternative to next-routes?

It's not.

Functionality wise I like this. The problem is the name of the routeMap exportPathMap. Since it's something we defined for next-export.

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.

@arunoda
Copy link
Contributor

arunoda commented Apr 4, 2018

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.

Copy link
Contributor

@arunoda arunoda left a 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) {
Copy link
Contributor

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?

@arunoda
Copy link
Contributor

arunoda commented Apr 5, 2018

@timneutkens awesome.
Let's take this.

@arunoda arunoda merged commit dac2f39 into vercel:canary Apr 5, 2018
@timneutkens timneutkens deleted the add/read-exportpathmap-development branch April 5, 2018 09:04
@lock lock bot locked as resolved and limited conversation to collaborators Apr 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants