Skip to content
This repository has been archived by the owner on Jul 4, 2021. It is now read-only.

bennypowers/rollup-plugin-lit-css

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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