Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including rollup-plugin-lit-css with all npm packages installed. Try it out:

var rollupPluginLitCss = require("rollup-plugin-lit-css")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

rollup-plugin-lit-css v2.0.5

Rollup plugin to import css files as lit-element tagged css objects.


Rollup plugin to import css files as lit-element tagged css objects.

Do I Need This?

No. This is an optional package who's sole purpose is to make it easier to write CSS-in-CSS while working on lit-element projects. You can just as easily write your CSS in some 'styles.css.js' modules a la:

import { css } from 'lit-element';
export default css`:host { display: block; }`;

And this may actually be preferred.

Hopefully this package will become quickly obsolete when the CSS Modules Proposal (or something like it) is accepted and implemented.

In the mean time, enjoy importing your CSS into your component files.


import config from './'
import litcss from 'rollup-plugin-lit-css';

export default {
  plugins: [
    litcss({ include, exclude, uglify })


includeArray of glob of files to include.['**/*.css']
excludeArray of glob of files to exclude.undefined
uglifyBoolean or Object of uglifycss options.false
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free