-
Notifications
You must be signed in to change notification settings - Fork 29.9k
Closed
Milestone
Description
After discussions with @timneutkens, here are several ways to make Next.js faster to work with during development.
- hard-source-webpack-plugin
resolve.unsafeCache- autodll-webpack-plugin - Share common deps with disk caching.
- Webpack@5 module disk cache ([spec: webpack 5] - A module disk cache between build processes webpack/webpack#6527)
- cache-loader - Caches the result of following loaders on disk
- Prebuild next.js pages on server start
- Allow multiple pages in the same bundle
- Reduce size of common deps
- Lodash = babel-plugin-lodash + lodash-webpack-plugin + https://medium.com/making-internets/why-using-chain-is-a-mistake-9bc1f80d51ba
Metrics
- Server start time.
- Incremental build time for changes on same page (HMR).
- Direct page visit (typing in url).
- Navigating to new page via a link.
- SSR of React Component
Profiling tools
- Chrome DevTools
--inspect- profile any part of the app (including flamecharts with a slightly easier workflow than ProfilerPlugin I think) - ProfilerPlugin in Webpack@4 - generates flamecharts for builds
webpackDevMiddleware.stats = 'verbose'- Monkey-patch next build to show
stats.toString() - WebpackAnalyzePlugin
- require('perf_hooks') - https://nodejs.org/api/perf_hooks.html
josephluck, jasonbarry, HaNdTriX, nikolajordanovski, Enalmada and 18 moreglopezepitibbers
Metadata
Metadata
Assignees
Labels
No labels