前端winter、杨村长、然叔admin后台管理搭建(Vite栈)
静态化的时机
在** 开发环境**,每次请求都会运行一次 getStaticProps
这是为了方便修改代码重新运行
在生产环境,getStaticProps 只会在 build 时运行一次
这样可以提供一份 HTML 给所有用户下载
解读打包文件
λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
○ (Static) automatically rendered as static HTML (uses no initial props)
● (SSG) automatically generated as static HTML + JSON (uses getStaticPro