awesome-webpack-perf
by iamakulov
A curated list of webpack tools for web performance
AI summary
Webpack perf optimizer
A curated collection of tools and plugins to optimize web performance using Webpack
- stars
- 957
- forks
- 25
- watching
- 27
- awesome lists
- 2
- entries
- 46
What's in the list
46 links in 17 sections, with live GitHub stats.activeno commit in 2y
Built-in stuff
- mode: 'production'
in the webpack config enables the common production optimizations
- optimization.splitChunks
in the webpack config enables splitting one bundle into smaller chunks. This helps to load less JS for each page and cache better
- optimization.runtimeChunk
in the webpack config enables splitting webpack’s runtime code into a separate chunk. This improves long-term caching
JS minifiers
- uglifyjs-webpack-plugin
– Uglify is an ES5 minifier
- terser-webpack-plugin
– Terser is a fork of Uglify that has support for ES2015+. Ships with webpack
- babel-minify-webpack-plugin
– Babel Minify is a minifier built in the Babel pipeline. It supports all syntax Babel supports
- closure-webpack-plugin
– Closure Compiler is a minifier developed by Google. It has several advanced optimizations that are unsafe for some apps but compress better
- esbuild-webpack-plugin
– ESBuild is a JS&TS compiler/minifier written in Go. It’s ~50-100× faster
CSS / Minifiers
- postcss-csso
is a PostCSS plugin that can be used with
- csso-webpack-plugin
only works when you use . However, it compresses CSS better than the loader – e.g., it can merge rules from multiple source files
- cssnano
is a PostCSS plugin that can be used with
- optimize-css-assets-webpack-plugin
, technically, works with any minifier, but ships (and works best) with . This plugin only works when you use . However, it compresses CSS better than the loader – e.g., it can merge rules from multiple source files
- postcss-clean
is a PostCSS plugin that can be used with
CSS / Other optimizers
- purgecss-webpack-plugin
analyzes the app code and styles and removes CSS rules that aren’t used anywhere. Works great with CSS frameworks like Bootstrap
CSS / Extraction plugins
- mini-css-extract-plugin
is the de-facto default solution for extracting styles in modern webpack
- extract-text-webpack-plugin
was the most popular plugin for extracting styles in webpack 1-3
- extract-css-chunks-webpack-plugin
has the same API as but offers better hot module replacement support
CSS / Critical CSS plugins
- html-critical-webpack-plugin
runs the tool on every webpack build. Uses a headless browser, returns styles only for
- critters-webpack-plugin
renders HTML in a JSDom environment on every webpack build. Doesn’t use a headless browser (= less heavy); returns all styles needed by the page, not only the above-the-fold ones (= may fix some glitches)
- isomorphic-style-loader
helps to extract critical styles during server-side rendering
CSS-in-JS / Minification
- minify-cssinjs-loader
works with all CSS-in-JS libraries thanks to regex-based matching. Does basic compression of style strings
CSS-in-JS / Minification / . Many popular CSS-in-JS libraries have Babel plugins specifically created for them. They typically do a better job at optimization:
CSS-in-JS / Zero-runtime libraries
Images / Image compression tools: universal
Images / Image compression tools: for a single format
- svgo-loader
optimizes images by passing them through
- svg-sprite-loader
combines multiple images into a single sprite
- webp-loader
converts images to the format
Fonts
- google-fonts-webpack-plugin
downloads Google Fonts to the build directory for self-hosting
- fontmin-webpack
minifies icon fonts to just what’s used
Gzip/Brotli
- compression-webpack-plugin
works for Gzip and Brotli
- brotli-webpack-plugin
works for Brotli
<link rel> and <script async>
- preload-webpack-plugin
preloads asynchronous chunks¹ with or
- html-webpack-preconnect-plugin
adds for a separate domain (e.g., an API server)
- script-ext-html-webpack-plugin
adds or attributes to bundle scripts
Prerendering
Progressive web apps (PWA)
- webpack-pwa-manifest
generates a and resizes app icons for a PWA
Other web performance lists
Awesome WPO
– A curated list of Web Performance Optimization
Webpack Libs Optimizations
– A collection of Babel and webpack plugins to optimize the size of various popular libraries
Nothing in this list matches your filter.
Featured in 2 awesome lists
Each link jumps to the spot where the list mentions awesome-webpack-perf.
More related projects
kangax/html-minifier5K
thedaviddias/front-end-checklist69.2K
ixartz/eleventy-starter-boilerplate269
macbre/phantomas2.3K
uncss/uncss9.4K
coderaiser/minify231
vheemstra/vite-plugin-imagemin22
amarcu5/piper261
adobe-type-tools/opentype-svg216
rlopzc/elm-webpack-starter112
csstree/csstree1.9K
thedaviddias/front-end-performance-checklist16.7K
psliwa/image-optimizer912