async-css-plugin weekly downloads statistics
By andreashuber69 · npm · Webpack plugins
Minimal webpack plugin that transforms links to css files such that they are loaded asynchronously.
async-css-plugin has 81 recorded weekly downloads on npm, an increase of 15.7% over the past 30 days, ranking #2664 of 3,247 tracked listings.
About async-css-plugin
Browsers load CSS files (stylesheets) synchronously such that rendering of a page is delayed until all linked stylesheets have been downloaded. This behavior is typically desired because unstyled HTML is not something you want your users to see.
However, synchronous CSS loading can also get in the way, namely when a framework like Vue bundles your single page application such that all stylesheets are linked in index.html, but none of those styles are necessary to render the page initially. One common example is when index.html is designed to quickly show a loading indicator, then load all required assets in the background to finally transition to the main page when everything is ready. With synchronous CSS downloads the rendering of the loading indicator can be delayed to the point where e.g. a mobile user is shown a white screen for many seconds before the indicator finally shows up.
This is where asynchronous CSS loading can lead to a manifold decrease of the time to First Paint and thus to a much better perceived responsiveness of your site.
Prerequisites
This plugin is designed for applications that are built using webpack. More specifically, your application must satisfy one of the following conditions:
- Your application is built using webpack directly or a framework that allows for the configuration of webpack with webpack.config.js, like e.g. React.
- Your application is built using a framework like Vue that "abstracts away" webpack.config.js but provides a different way to modify the webpack configuration.
NOTE: Unfortunately, this plugin does not seem to work with apps based on Angular, see this repo for more information. The steps still work with Angular v14, except for step 9, which can be safely skipped (with v14 css is always extracted, the
extractCsssetting is therefore no longer supported).
Getting Started
Installation
npm install async-css-plugin --save-dev
Configuration
AsyncCssPlugin configuration depends on how your project is set up, please see Prerequisites for
more information.
webpack.config.js for webpack v4 & v5
If your project is configurable with webpack.config.js, it most likely
already contains this file. For example, if you create a new React application with
create-react-app and then run npm run eject, you'll find the file
in the config folder. In this case you usually only need to add 2 lines of code:
// ... existing requires ...
const AsyncCssPlugin = require("async-css-plugin"); // added for async CSS loading
module.exports = {
// ... existing options ...
plugins: [
// ... existing plugins ...
new AsyncCssPlugin({ logLevel: "info" }), // added for async CSS loading
],
};
If you started with webpack directly, e.g. as described here, then you've probably already created webpack.config.js yourself. In this case, you first need to get webpack to generate HTML, with html-webpack-plugin. Moreover, for CSS to be generated into separate files it is recommended to use mini-css-extract-plugin and css-loader. You can add these dependencies as follows:
npm install html-webpack-plugin mini-css-extract-plugin css-loader --save-dev
Given the configuration recommendations for these plugins with added asynchronous CSS loading your webpack.config.js should minimally look something like this:
const AsyncCssPlugin = require("async-css-plugin");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");…
Description from the npm listing.
- async
- css
- stylesheet
- webpack
- webpack-plugin
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (170)Similar npm Webpack plugins plugins
All 20 async-css-plugin alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/async-css-plugin. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.