Next.js 9.4 已发布,Next.js 是一个用于在服务端渲染 React 应用程序的简单框架。
主要更新内容如下:
export async
function
getStaticProps
()
{
return
{
props: await getDataFromCMS(),
// we will attempt to re-generate the page:
// - when a request comes in
// - at most once every second
unstable_revalidate:
1
}
}.env以及NEXT_PUBLIC_前缀,如 CRA 中的例子node-fetch和isomorphic-fetch导入,转而支持内置的fetch polyfill,适用于 Node.js 和所有浏览器(构建和运行时)../../../代码includePaths,和其他内置支持 Sass 的选项详情查看 https://nextjs.org/blog/next-9-4
(文/开源中国)