Compilation
NextJS Compiler
Transforms code into Javascript for browser to understand
- During both development / production
Minifying
Removing unecessary code to make files smaller
- e.g. comments/white space
Bundling
Resolving web dependencies and merging files into optimzed bundles for browser
- Goal: Reduce number of requests when site is visited
Code Splitting
Splitting application bundle into smaller chunks for each entry point
- Goal: Reduce initial load time by only loading code required to run that page
- Inbuilt
- Other pages are pre-loaded after initial page is loaded