@web-alchemy/eleventy-plugin-lightningcss

0.1.0 • Public • Published

Eleventy Plugin for LightningCSS

Plugin adds template format for CSS and filter transformStyles processing by LightningCSS.

Installation

npm install @web-alchemy/eleventy-plugin-lightningcss

Configuration

const EleventyPluginLightningCSS = require('@web-alchemy/eleventy-plugin-lightningcss');

module.exports = function(eleventyConfig) {
  eleventyConfig.addPlugin(EleventyPluginLightningCSS, {
    // filter files that should not be processed
    filter(inputContent, inputPath) {
      return !inputPath.includes('components');
    },

    // options passed to lightningcss functions `transform` and `bundle`
    lightningcss: {
      minify: process.env.NODE_ENV === 'production'
    },
    
    // browserlist query (https://browsersl.ist/)
    targets: '>= 0.1%'
  })
}

Usage

See example in repository

Package Sidebar

Install

npm i @web-alchemy/eleventy-plugin-lightningcss

Weekly Downloads

1

Version

0.1.0

License

none

Unpacked Size

4 kB

Total Files

3

Last publish

Collaborators

  • monochromer