preactjs/preact-cli

prerender urls for dynamic routes

Open

#1,097 创建于 2020年3月31日

在 GitHub 查看
 (14 评论) (0 反应) (0 负责人)JavaScript (415 fork)batch import
feature requesthelp wanted

仓库指标

Star
 (4,674 star)
PR 合并指标
 (30 天内没有已合并 PR)

描述

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.

贡献者指南