1. 程式人生 > >從nextjs 6升級到nextjs 7

從nextjs 6升級到nextjs 7

nextjs作為一個當前很火的ssr框架,在9.20他迎來了一個大版本的升級,在這次升級中

DX improvements: 57% faster bootup, 42% faster re-compilation 開發體驗(develepment experinece)提高,啟動加快 57%,重新編譯提高了42%

Better error reporting with react-error-overlay 更好的錯誤報告

Upgraded compilation pipeline: Webpack 4 and Babel 7 升級編譯管道:Webpack 4 和 Babel 7

Standardized Dynamic Imports 標準化的動態引用

Static CDN support 靜態CDN支援

Smaller initial HTML payload 更小的初始化HTML頁面

React Context with SSR between App and Pages 在應用和頁面中共享了SSR的React Context

那我們應該如何升級來用上這些新特性呢?