Skip to content
PluginStats

rollup-plugin-postcss-lit weekly downloads statistics

By umbopepato · npm · Vite plugins

Rollup plugin to load PostCSSed stylesheets in LitElement components

View on npm Stale · Dec 2, 2026

rollup-plugin-postcss-lit has 10,005 recorded weekly downloads on npm, an increase of 59.3% over the past 30 days, ranking #1257 of 3,247 tracked listings.

Weekly downloads
10,005
Official API · Dec 5, 2026
7-day growth
+33.9%
+2.5K weekly downloads
30-day growth
+59.3%
+3.7K weekly downloads
90-day growth
+155%
+6.1K weekly downloads
Rank
#1257
▲ 94 in 7 days

About rollup-plugin-postcss-lit

Rollup plugin postcss lit

Rollup plugin to load PostCSSed stylesheets in LitElement components

Node.js CI Npm release MIT License

Install

$ npm i -D rollup-plugin-postcss-lit

Usage

Add postcssLit plugin after postcss. This wraps PostCSSed styles in Lit's css template literal tag, so you can import them directly in your components.

// rollup.config.js
import postcss from 'rollup-plugin-postcss';
import postcssLit from 'rollup-plugin-postcss-lit';

export default {
  input: 'entry.js',
  output: {
    // ...
  },
  plugins: [
    postcss({
      // ...
    }),
    postcssLit(),
  ],
}

Add PostCSSed stylesheets to your LitElement components:

import {LitElement, css} from 'lit';
import {customElement} from 'lit/decorators.js';
import myStyles from './styles.css';
import otherStyles from './other-styles.scss';

@customElement('my-component')
export class MyComponent extends LitElement {

  // Add a single style
  static styles = myStyles;

  // Or more!
  static styles = [myStyles, otherStyles, css`
    .foo {
      color: ${...};
    }
  `];

  render() {
    // ...
  }
}
<details> <summary>JS version</summary>
import {LitElement, css} from 'lit';
import myStyles from './styles.css';
import otherStyles from './other-styles.scss';

export class MyComponent extends LitElement {

  // Add a single style
  static get styles() {
    return myStyles;
  }

  // Or more!
  static get styles() {
    return [myStyles, otherStyles, css`
      .foo {
        color: ${...};
      }
    `];
  }

  render() {
    // ...
  }
}

customElements.define('my-component', MyComponent);
</details>
Usage with lit-element

If you're using the lit-element package, set the importPackage option accordingly:

// rollup.config.js
import postcss from 'rollup-plugin-postcss';
import postcssLit from 'rollup-plugin-postcss-lit';

export default {
  input: 'entry.js',
  output: {
    // ...
  },
  plugins: [
    postcss({
      // ...
    }),
    postcssLit({
      importPackage: 'lit-element',
    }),
  ],
}
Usage with Vite

This plugin is pre-configured to work with Vite, just add it to plugins and your styles will be Lit-ified ✨

// vite.config.js/ts
import postcssLit from 'rollup-plugin-postcss-lit';

export default {
  plugins: [
    postcssLit(),
  ],
};


// my-component.js/ts
import myStyles from './styles.css?inline';

⚠️ Use the ?inline suffix to prevent Vite from adding the styles to the CSS bundle as well

Options

postcssLit({

  /**
   * A glob (or array of globs) of files to include
   *
   * @default '**‎/*.{css,sss,pcss,styl,stylus,sass,scss,less}?(*)'
   */
  include: ...,

  /**
   * A glob (or array of globs) of files to exclude
   *
   * The default filter is used to prevent `<style>` HTML tags from being processed in Vite contexts 
   * @default '**‎/*?direct*'
   */
  exclude: ...,

  /**
   * A string denoting the name of the package from which to import the `css`
   * template tag function. For lit-element this can be changed to 'lit-element'
   * 
   * @default 'lit'
   */
  importPackage: ...,
}),

PostCSS plugin setup

rollup-plugin-postcss injects all the imported stylesheets in <head> by default: this causes an unnecessary style duplication if you're using the default ShadowDOM -based style encapsulation in your Lit components. Unless you're using Light DOM, consider disabling the inject option:

// rollup.config.js

export default {
  ...
  plugins: [
    postcss({
      inject: false,
    }),
    postcssLit(),
  ],
};

When should I use it?

This plugin is meant to be used with rollup-plugin-postcss. If you only need to load plain css files in your LitElement components, consider using rollup-plugin-lit-css.

Contributors
<a href="https://github.com/umbopepato/rollup-plugin-postcss-lit/graphs/contributors"> <img src="https://contributors-img.web.app/image?repo=umbopepato/rollup-plugin-postcss-lit" height="40"/> </a>
License

This project is licensed under the MIT License, see LICENSE for details.

Description from the npm listing.

  • postcss
  • css
  • lit
  • lit-element
  • lit-html
  • sass
  • scss
  • less
  • stylus
  • css-modules
  • rollup-plugin
  • vite-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

rollup-plugin-postcss-lit weekly downloads on npm, last 90 days: 10,005 weekly downloads as of Dec 5, 2026, +155% over 90 days.rollup-plugin-postcss-litWeekly downloads on npm · Last 90 days10,005downloads / week+155% over 90 days02K4K6K8K10K12KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
rollup-plugin-postcss-lit weekly downloads on npm, last 90 days: 10,005 weekly downloads as of Dec 5, 2026, +155% over 90 days.

7/30/90-day growth

rollup-plugin-postcss-lit weekly downloads growth on npm: +33.9% over 7 days, +59.3% over 30 days, +155% over 90 days.rollup-plugin-postcss-litWeekly downloads growth on npm10,005downloads / week now7-day growth+2,534 weekly downloads+33.9%30-day growth+3,726 weekly downloads+59.3%90-day growth+6,084 weekly downloads+155%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
rollup-plugin-postcss-lit weekly downloads growth on npm: +33.9% over 7 days, +59.3% over 30 days, +155% over 90 days.

Ranking history

rollup-plugin-postcss-lit npm ranking history: currently #1257 (by weekly downloads).rollup-plugin-postcss-litnpm ranking · by weekly downloads · Last 90 days#1257current rank#1150#1200#1250#1300#1350#1400#1450Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 34 observations · Updated Dec 5, 2026pluginstats.com
rollup-plugin-postcss-lit npm ranking history: currently #1257 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 63, #17 (overall #1,257)
All npm: every listing in weekly downloads order

Listing placement

Vite plugins300 listings · 15 pages · page 12, #8 (overall #228)
Vite plugins: every listing in weekly downloads order

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)
Recent weekly downloads observations for rollup-plugin-postcss-lit
Date (UTC)Weekly downloadsChange vs. previous
10,005-430
10,435+668
9,767+962
8,805+80
8,725+472
8,253+437
7,816+345
7,471-417
7,888-211
8,099-71
8,170+42
8,128+382
7,746-357
8,103—

Similar npm Vite plugins plugins

All 20 rollup-plugin-postcss-lit alternatives

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/rollup-plugin-postcss-lit. First seen Oct 16, 2026; last successful collection Dec 2, 2026. See the methodology.