0.1.0 • Published 8 months ago

@web-alchemy/eleventy-plugin-lightningcss v0.1.0

Weekly downloads
-
License
-
Repository
github
Last release
8 months ago

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

0.1.0

8 months ago

0.0.4

8 months ago

0.0.3

11 months ago

0.0.2

11 months ago

0.0.1

11 months ago