preactjs/preact-cli

prerender urls for dynamic routes

Open

#1.097 aberto em 31 de mar. de 2020

Ver no GitHub
 (14 comments) (0 reactions) (0 assignees)JavaScript (415 forks)batch import
feature requesthelp wanted

Métricas do repositório

Stars
 (4.674 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

Hello guys. I'm trying to create prerender-urls with some simple metadata for routes in my website, but looks like it's impossible now.

My prerender-urls.js looks like:

module.exports = function() {
  return [
    {
      url: "/",
      title: "Main page"
    },
    {
      url: "/catalog/:id",
      title: "Catalogue"
    }
  ];
};

But it is not working. My route in application also defined for path /catalog/:id. If i replace :id with some existing id for my catalog page, for example, 3031 it works as expected. How can I achieve this with preact-cli for dynamic urls? Thank you.

Guia do colaborador