Skip to content

Latest commit

 

History

History
94 lines (68 loc) · 1.76 KB

README.md

File metadata and controls

94 lines (68 loc) · 1.76 KB

unplugin-lightningcss npm jsr

Unit Test

Lightning CSS integration for Vite, Rollup, esbuild, Webpack, Vue CLI, and more.

Installation

npm i -D unplugin-lightningcss
Vite
// vite.config.ts
import LightningCSS from 'unplugin-lightningcss/vite'

export default defineConfig({
  plugins: [LightningCSS()],
})


Rollup
// rollup.config.js
import LightningCSS from 'unplugin-lightningcss/rollup'

export default {
  plugins: [LightningCSS()],
}


esbuild
// esbuild.config.js
import { build } from 'esbuild'

build({
  plugins: [require('unplugin-lightningcss/esbuild')()],
})


Webpack
// webpack.config.js
module.exports = {
  /* ... */
  plugins: [require('unplugin-lightningcss/webpack')()],
}


Example

import { Features } from 'lightningcss'

export default {
  plugins: [
    LightningCSS({
      options: {
        include: Features.Nesting,
      },
    }),
  ],
}

Sponsors

License

MIT License © 2023-PRESENT 三咲智子