Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

93
Vistas
How to setup parametrized next routing w/o server-side rendering?

I am trying to set up the routing with my next.js configuration. Whatever I tried so far did not produce the intended results. This is becoming confusing and frustrating for me, any help will be appreciated.

Here is what I want:

  • url goes to / => /index.js
  • url goes to /users/ => /user/index.js
  • url goes to /users/[user-id] => /user/user.js

Here is what doesn't work:

module.exports = {
  target: "serverless",
  async rewrites() {
    return {
        afterFiles: [
          {
            source: "/users/",
            destination: "/users/"
          },
          {
            source: "/users/:path*",
            destination: "/users/:path*"
          },
          {
            source: "/:path*",
            destination: "/:path*"
          },
          {
            source: "/:else*",
            destination: "/"
          }
      ]
    };
  },
};
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda