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

Restore ability to customize routes #714

Closed
ghost opened this issue Jul 28, 2020 · 1 comment
Closed

Restore ability to customize routes #714

ghost opened this issue Jul 28, 2020 · 1 comment

Comments

@ghost
Copy link

ghost commented Jul 28, 2020

Type: minor

Describe the bug
The i18n work done on this app introduced an i18n router and removed the ability to customize routes or see what routes are available at a glance. As a result it's no longer trivial to add a custom homepage as described in the docs.

To Reproduce
Steps to reproduce the behavior:

  1. Spin up a dev environment.
  2. Reference the linked documentation
  3. Attempt to create a custom homepage.

Expected behavior
Routes may be customized by the user in a non-trivial fashion.

Screenshots
n/a

Additional context
I've submitted a related documentation issue here: reactioncommerce/reaction-docs#954

@janus-reith
Copy link
Collaborator

@balibebas
Technically, nothing prevents you from creating new pages, or adding custom routes in your next.config.js.
I guess this is mainly a matter of lacking documentation, but techncially there is no functionality that needs to be restored.

Just instead of relying on a custom express server and a package that was last updated over 2 years ago, we now make use of the latest features Nextjs offers out of the box. Getting rid of the custom express server comes with other benefits, for example the storefront can now be used on serverless deployments, mainly Vercel at this time.

Interesting docs that describe the used patterns would be:

https://nextjs.org/docs/api-reference/next.config.js/rewrites
https://nextjs.org/docs/api-reference/next.config.js/redirects
https://nextjs.org/docs/routing/dynamic-routes

I wonder if we shoud close this issue since there is one in reaction-docs already, or simply rename it, as we could also need one here regarding the update of the docs included in the storefront repo.

@ghost ghost closed this as completed Jul 29, 2020
This issue was closed.
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

No branches or pull requests

1 participant