An awesome list of tools and techniques to make your web bundle size smaller and your web apps load faster.
- Concepts
- Tools to analyze bundle size
- Tools to monitor the bundle size
- Tools to analyze the cost of imports
- Tools to help with Code Splitting
- Bundle size optimization guides
- Code Splitting
- Videos and talks
Code-splitting your app can help you βlazy-loadβ just the things that are currently needed by the user, which can dramatically improve the performance of your app. While you haven't reduced the overall amount of code in your app, you've avoided loading code that the user may never need, and reduced the amount of code needed during the initial load.
Source: https://reactjs.org/docs/code-splitting.html
Tree shaking is a term commonly used in the JavaScript context for dead-code elimination. It relies on the static structure of ES2015 module syntax, i.e. import and export. The name and concept have been popularized by the ES2015 module bundler rollup.
Source: https://webpack.js.org/guides/tree-shaking
- source-map-explorer - Analyze and debug space usage through source maps.
- Webpack Bundle Analyzer - Webpack plugin and CLI utility that represents bundle content as convenient interactive zoomable treemap.
- Webpack Bundle Size Analyzer - A tool for finding out what contributes to the size of Webpack bundles.
- size-plugin - Track compressed Webpack asset sizes over time.
- Webpack Monitor - A tool for monitoring webpack optimization metrics through the development process.
- Bundle optimize helper - A tool that will analyze your bundle and give you actionable suggestions on what to improve to reduce your bundle size.
See: #bundlesize and #bundle-size on GitHub.
- compressed-size-action - GitHub action that reports changes in compressed file sizes on your PRs.
- BundleWatch - Keep watch of your bundle size.
- Harold - CLI tool that compares frontend project bundles in size.
- bundlephobia - Find out the cost of adding a new frontend dependency to your project.
- Import Cost - Displays the import size of the package you are importing inside the code editor.
- Bundle Buddy - A tool to identify bundle duplication across splits.
- Optimising your application bundle size with webpack
- How I Cut My React JavaScript Bundle Size In Half With Three Lines of Code
- Webpack: Optimizing Your Bundle Size
- Here's how I reduced my bundle size by 90%
- Optimizing Bundle size Webpack
- Put Your Webpack Bundle On A Diet - Part 1
- Put Your Webpack Bundle On A Diet - Part 2
- Put Your Webpack Bundle On A Diet - Part 3
- Put Your Webpack Bundle On A Diet - Part 4
- You don't (may not) need Lodash/Underscore
- You don't (may not) need Moment.js
- You Might Not Need jQuery
- Reduce JavaScript Payloads with Code Splitting
- Effective Code Splitting in React: A Practical Guide
- Lessons Learned: Code Splitting with Webpack and React
- Avoid this gotcha when code-splitting with TypeScript and Webpack