Zachary Horvath • 2023-01-23 • 3 min read #webdevelopment
- Code splitting: This technique involves splitting your code into multiple smaller chunks and only loading the chunks that are needed for the current user interaction. This allows you to only send the code that is necessary for the current page or feature, rather than sending all of the code at once.
- Tree shaking: This technique is used by modern bundlers such as webpack to eliminate unnecessary code from the final bundle. The bundler will analyze the code and remove any functions or variables that are not actually used by the application.