Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

rollup-plugin-lit-css

2.0.4 • Public • Published

rollup-plugin-lit-css

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.

Usage

import config from './rollup.config.rest.js'
import litcss from 'rollup-plugin-lit-css';
 
export default {
  ...config,
  plugins: [
    litcss({ include, exclude, uglify })
  ]
}

Options

Name Accepts Default
include Array of glob of files to include. ['**/*.css']
exclude Array of glob of files to exclude. undefined
uglify Boolean or Object of uglifycss options. false

Install

npm i rollup-plugin-lit-css

DownloadsWeekly Downloads

239

Version

2.0.4

License

MIT

Unpacked Size

8.73 kB

Total Files

12

Last publish

Collaborators

  • avatar