Webpack Performance Tuning: Minimizing Build Times for Large Projects

This page summarizes the projects mentioned and recommended in the original post on dev.to

InfluxDB - Purpose built for real-time analytics at any scale.
InfluxDB Platform is powered by columnar analytics, optimized for cost-efficient storage, and built with open data standards.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • webpack

    A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows for loading parts of the application on demand. Through "loaders", modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.

    This is particularly true for Webpack, one of the most popular bundlers in the industry, with over 30 million downloads per week.

  • InfluxDB

    Purpose built for real-time analytics at any scale. InfluxDB Platform is powered by columnar analytics, optimized for cost-efficient storage, and built with open data standards.

    InfluxDB logo
  • berry

    πŸ“¦πŸˆ Active development trunk for Yarn βš’

    Now that we've discussed optimizations to reduce Webpack build times, let's shift our focus to package installation times. Currently, we are using Yarn 1.22, where the installation process takes approximately 10 minutes.

  • react-cool-starter

    😎 🐣 A starter boilerplate for a universal web app with the best development experience and a focus on performance and best practices.

    For those who want to follow this, these are the before and after repo for the whole process Webpack Repo : https://github.com/wellyshen/react-cool-starter Rspack Repo : https://github.com/jainChetan81/rspack-example

  • rspack-example

    For those who want to follow this, these are the before and after repo for the whole process Webpack Repo : https://github.com/wellyshen/react-cool-starter Rspack Repo : https://github.com/jainChetan81/rspack-example

  • vite

    Next generation frontend tooling. It's fast!

    When considering improvements in bundling performance, a common suggestion is to switch to Vite, which offers a significant performance advantage. While it is doable, However because of dependencies on core webpack within our project, and many necessary packages like Loadable which aren’t supported in other bundlers, transitioning to Vite proved challenging. Additionally, strict limitation on the final bundle size made this option less feasible.

  • swc

    Rust-based platform for the Web

    Babel with 49,577,061 npm downloads per week, is the most used tool for JavaScript transformation, we looked at Esbuild as a replacement but many functionalities, most notably loadable support, are missing. Another alternative SWC, written in Rust, supports all the necessary functionalities we need, and on top of that it has APIs similar to Babel, making migration much smoother than other alternatives:

  • Sass

    Sass makes CSS fun!

    Sass: (1min 17s)

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • React

    The library for web and native user interfaces.

    The platform consists of an Express.js backend and a React frontend, each requiring a separate build process. Furthermore, we adhere to the Adaptive design philosophy, meaning we create distinct builds for mobile and desktop, to minimize the bundle size.

  • PostCSS

    Transforming styles with JS plugins

    PostCSS is essential to the frontend ecosystem, with 69,473,603 downloads per week, it is bigger than all the above libraries mentioned, and has many features other than polyfilling, it is used by all the frameworks like Next.js, Svelte, Vue, and Tailwind under the hood. LightningCSS, created by the maintainer of another bundler Parcel, and written in Rust, is an excellent alternative. It provides all the functionalities of PostCSS, including autoprefixer, with enhanced performance.

  • pnpm

    Fast, disk space efficient package manager

    Here is a benchmark published on Github that compares the performance of various package managers, including Yarn, Pnpm and Bun.

  • parcel

    The zero configuration build tool for the web. πŸ“¦πŸš€

    While bundlers like Vite and Parcel present challenges due to our specific needs, two newer alternatives for Webpack show promise. Turbopack, the successor to Webpack created by Tobias Koppers, offers substantial performance enhancements. But, its current beta status and exclusivity for Next.js, limits its immediate usability for us.

  • Next.js

    The React Framework

    This architecture allows Webpack to extend its capabilities far beyond its core functionality. By providing a robust plugin and loader system, Webpack becomes a highly extensible platform. This allows developers to create custom plugins, loaders, and configurations tailored to specific project needs. As a result, webpack serves as a foundation for more specialized tools and frameworks like Next.js.

  • loadable-components

    The recommended Code Splitting library for React βœ‚οΈβœ¨

    When considering improvements in bundling performance, a common suggestion is to switch to Vite, which offers a significant performance advantage. While it is doable, However because of dependencies on core webpack within our project, and many necessary packages like Loadable which aren’t supported in other bundlers, transitioning to Vite proved challenging. Additionally, strict limitation on the final bundle size made this option less feasible.

  • Express

    Fast, unopinionated, minimalist web framework for node.

    The platform consists of an Express.js backend and a React frontend, each requiring a separate build process. Furthermore, we adhere to the Adaptive design philosophy, meaning we create distinct builds for mobile and desktop, to minimize the bundle size.

  • esbuild

    An extremely fast bundler for the web

    Babel with 49,577,061 npm downloads per week, is the most used tool for JavaScript transformation, we looked at Esbuild as a replacement but many functionalities, most notably loadable support, are missing. Another alternative SWC, written in Rust, supports all the necessary functionalities we need, and on top of that it has APIs similar to Babel, making migration much smoother than other alternatives:

  • sdk

    The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.

    Node-sass, a JavaScript-based implementation, has been deprecated and is no longer maintained. In contrast, Dart-sass, written in Dart Language from scratch with performance in mind, is also recommended by the same team can speed up SASS transformations.

  • bun

    Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one

    Here is a benchmark published on Github that compares the performance of various package managers, including Yarn, Pnpm and Bun.

  • babel-sublime

    Syntax definitions for ES6 JavaScript with React JSX extensions.

    Babel with 49,577,061 npm downloads per week, is the most used tool for JavaScript transformation, we looked at Esbuild as a replacement but many functionalities, most notably loadable support, are missing. Another alternative SWC, written in Rust, supports all the necessary functionalities we need, and on top of that it has APIs similar to Babel, making migration much smoother than other alternatives:

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Top 20 Javascript Libraries on Github

    20 projects | dev.to | 13 Jun 2024
  • [AskJS] Are there any Electron alternatives that uses less recourses?

    8 projects | /r/javascript | 23 Mar 2023
  • 100+ Must Know Github Repositories For Any Programmer

    82 projects | dev.to | 17 Nov 2022
  • Top 33 JavaScript Projects on GitHub (November 2021)

    29 projects | dev.to | 13 Nov 2021
  • From React to React Native – A Beginner-Friendly GuideπŸš€

    3 projects | dev.to | 17 Sep 2024

Did you konow that JavaScript is
the 3rd most popular programming language
based on number of metions?