Skip to content
PluginStats

@stylexswc/webpack-plugin weekly downloads statistics

By stylexswc · npm · Webpack plugins

StyleX plugin for webpack powered by a Rust NAPI-RS/SWC compiler. Fast StyleX transforms and CSS extraction without Babel.

View on npm Fresh · Oct 17, 2026

@stylexswc/webpack-plugin has 10,092 recorded weekly downloads on npm, a decrease of 67.3% over the past 30 days.

It ranks #903 of 2,255 tracked npm listings by weekly downloads.

Over 90 days, weekly downloads changed by -28.0%.

PluginStats has 543 daily observations since Apr 23, 2025; the latest is from Oct 17, 2026.

Weekly downloads
10,092
Official API · Oct 17, 2026
7-day growth
-78.7%
-37.4K weekly downloads
30-day growth
-67.3%
-20.8K weekly downloads
90-day growth
-28.0%
-3.9K weekly downloads
Rank
#903
Among tracked npm listings

About @stylexswc/webpack-plugin

@stylexswc/webpack-plugin

StyleX plugin for webpack, powered by a Rust compiler (NAPI-RS + SWC). Part of the StyleX SWC Plugin workspace.

This plugin compiles StyleX code in your webpack build with @stylexswc/rs-compiler, a Rust implementation of the StyleX transform, instead of the official Babel plugin. Your StyleX code stays exactly the same — only the build step changes, with per-file transforms 5x to 10x faster than Babel (performance). The plugin transforms your source files, collects the generated rules, and extracts them into a dedicated CSS chunk.

This is a community project and is not affiliated with Meta. It tracks the official StyleX releases (currently compatible with StyleX v0.19.1)

and requires Node.js 20 or newer. For Next.js projects, use @stylexswc/nextjs-plugin instead — it wires this plugin into the Next.js build for you.

Installation

The Rust compiler (@stylexswc/rs-compiler) is installed automatically as a dependency. Your application still needs the StyleX runtime:

Usage

Add the plugin to your webpack config:

Then import the carrier stylesheet once at the entry point of your app (e.g. index.js, App.tsx):

The plugin appends the extracted StyleX CSS to this asset during the build. Like a regular CSS file, it must flow through your CSS pipeline, so a css-loader + MiniCssExtractPlugin.loader rule (or webpack's built-in CSS support) has to cover .css files.

The carrier import is a recommendation, not a hard requirement. The plugin also appends tiny per-module CSS imports to every StyleX module, so any part of the bundle that renders a StyleX component pulls the stylesheet in on its own — most builds emit correct CSS even without the carrier. What the carrier adds is a guarantee that doesn't depend on your module graph: the stylesheet is always present and loaded with the entrypoint. That matters when something consumes StyleX output without rendering a StyleX component — plain CSS reading defineVars custom properties (var(--x…)), or injected markup carrying StyleX class names. If styles would actually be lost (no CSS asset exists to receive them at all), the plugin raises a compilation warning; it stays silent as long as the output is correct, carrier or not.

[!IMPORTANT] Migrating from 0.17.x: version 0.18.0 reworks the CSS extraction architecture. The CSS is no longer injected through auto-generated stylex.virtual.css imports — add the import '@stylexswc/webpack-plugin/stylex.css'; carrier import to your app entrypoint (recommended; see above for when you can skip it). Paths embedded in module identifiers are now relative to compiler.context, which changes chunk hashes once and makes builds reproducible across machines.

Plugin Options

Basic Options

rsOptions

• Type: Partial • Optional • Description: StyleX compiler options passed to @stylexswc/rs-compiler. For the standard options, see the official StyleX documentation.

[!NOTE] The include and exclude options are exclusive to the Rust compiler and are not available in the official StyleX Babel plugin.

rsOptions.include

• Type: (string | RegExp)[] • Optional • Description: Glob patterns or regular expressions selecting the files to transform. When specified, only files matching at least one pattern are transformed. Patterns are matched against paths relative to the current working directory.

rsOptions.exclude

• Type: (string | RegExp)[] • Optional • Description: Glob patterns or regular expressions excluding files from the transform. A file matching any exclude pattern is skipped even if it matches an include pattern. Patterns are matched against paths relative to the current working directory.

stylexImports

• Type: Array • Default: ['stylex', '@stylexjs/stylex'] • Description: Specifies where StyleX is imported from. Supports both string paths and import aliases.

useCSSLayers

• Type: boolean • Default: false • Description: Wraps the generated CSS in cascade layers for better style isolation.

nextjsMode

• Type: boolean • Default: false • Description: Enables Next.js-specific optimizations and compatibility features. Leave off unless the plugin is driven by the Next.js integration.

extractCSS

• Type: boolean • Optional • Default: true • Description: Controls whether the generated CSS is extracted into a separate file.

loaderOrder

• Type: 'first' | 'last' • Optional • Default: 'first' • Description: When the StyleX transformation runs relative to other webpack loaders. • 'first' (recommended): StyleX processes the source code before any other loaders run. Automatically enables injectStylexSideEffects so tree-shaking cannot remove .stylex and .consts imports. • 'last': StyleX processes after all other loaders have completed. Use this if other loaders (TypeScript, SWC plugins) must transform your code before StyleX sees it.

Why 'first' is recommended: after StyleX rewrites your code, imports from .stylex and .consts files can look unused to subsequent loaders and bundler passes and get tree-shaken away:

With loaderOrder: 'first', the plugin preserves these imports by injecting side-effect imports automatically.

stylexPackages

• Type: string[] • Optional • Default: ['@stylexjs/'] • Description: node_modules is excluded from the transform by default, even for files that reference a StyleX import. Packages that ship untransformed StyleX source (component libraries, token packages) must be allowlisted here with path fragments:

carrierCss

Path to a custom carrier stylesheet that receives the extracted StyleX CSS — the file you import once at your app entrypoint. Absolute, or relative to compiler.context. Replaces the default @stylexswc/webpack-plugin/stylex.css carrier: useful when another file named stylex.css in your project would collide with the default filename pattern, or when you want the carrier to live in your own source tree.…

Description from the npm listing.

  • atomic-css
  • css-extraction
  • css-in-js
  • napi-rs
  • react
  • rust
  • stylex
  • swc
  • webpack
  • webpack-plugin

Where @stylexswc/webpack-plugin sits in the listing

Each band is one page of 20. Weekly downloads on a log 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.

All npm2,248 listings · 113 pages · page 46, #3 (overall #903)
All npm: every listing in weekly downloads order
PNG SVG
Webpack plugins247 listings · 13 pages · page 2, #3 (overall #23)
Webpack plugins: every listing in weekly downloads order
PNG SVG

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

@stylexswc/webpack-plugin weekly downloads on npm, last 90 days: 10,092 weekly downloads as of Oct 17, 2026, -28.0% over 90 days.@stylexswc/webpack-pluginWeekly downloads on npm · Last 90 days10,092downloads / week-28.0% over 90 days010K20K30K40K50K60K70KJul 19Aug 3Aug 18Sep 2Sep 17Oct 2Oct 17downloads / weekobservedarchived (Internet Archive)no observationsJul 21, 2026 – Oct 17, 2026 · 89 observations · Updated Oc…pluginstats.com
@stylexswc/webpack-plugin weekly downloads on npm, last 90 days: 10,092 weekly downloads as of Oct 17, 2026, -28.0% over 90 days.
PNG SVG

7/30/90-day growth

@stylexswc/webpack-plugin weekly downloads growth on npm: -78.7% over 7 days, -67.3% over 30 days, -28.0% over 90 days.@stylexswc/webpack-pluginWeekly downloads growth on npm10,092downloads / week now7-day growth-37,365 weekly downloads-78.7%30-day growth-20,757 weekly downloads-67.3%90-day growth-3,920 weekly downloads-28.0%Growth vs. nearest observation to each baseline date · Updated Oct 17, 2026pluginstats.com
@stylexswc/webpack-plugin weekly downloads growth on npm: -78.7% over 7 days, -67.3% over 30 days, -28.0% over 90 days.
PNG SVG

Ranking history

@stylexswc/webpack-plugin npm ranking history: currently #903 (by weekly downloads).@stylexswc/webpack-pluginnpm ranking · by weekly downloads · Last 90 days#903current rank#200#300#400#500#600#700#800#900#1000Jul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18rankOct 17, 2026 – Oct 18, 2026 · 2 observations · Updated Oct 17, 2026pluginstats.com
@stylexswc/webpack-plugin npm ranking history: currently #903 (by weekly downloads).
PNG SVG

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.

Recent observations

Full history (543)
Recent weekly downloads observations for @stylexswc/webpack-plugin
Date (UTC)Weekly downloadsChange vs. previous
10,092-1.1K
11,190-4.6K
15,820-13.6K
29,463-12.5K
41,9490
41,949-4.1K
46,082-1.4K
47,457-1.1K
48,592-979
49,571+3.4K
46,217+3.3K
42,920-9.6K
52,563-2.6K
55,151—

Similar npm Webpack plugins plugins

Data 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/@stylexswc/webpack-plugin. First seen Oct 16, 2026; last successful collection Oct 19, 2026. See the methodology.