📜  下一个增量静态再生 - 无论代码示例

📅  最后修改于: 2022-03-11 15:00:46.739000             🧑  作者: Mango

代码示例1
// pages/products/[id].js

export async function getStaticPaths() {
  const products = await getTop1000Products();
  const paths = products.map((product) => ({
    params: { id: product.id },
  }));

  return { paths, fallback: 'blocking' };
}