unplugin-lightningcss
v0.2.1
Published
Lightning CSS integration for Vite, Rollup, esbuild, Webpack, Vue CLI, and more.
Downloads
18,471
Readme
unplugin-lightningcss
Lightning CSS integration for Vite, Rollup, esbuild, Webpack, Vue CLI, and more.
Installation
npm i -D unplugin-lightningcss
// vite.config.ts
import LightningCSS from 'unplugin-lightningcss/vite'
export default defineConfig({
plugins: [LightningCSS()],
})
// rollup.config.js
import LightningCSS from 'unplugin-lightningcss/rollup'
export default {
plugins: [LightningCSS()],
}
// esbuild.config.js
import { build } from 'esbuild'
build({
plugins: [require('unplugin-lightningcss/esbuild')()],
})
// webpack.config.js
module.exports = {
/* ... */
plugins: [require('unplugin-lightningcss/webpack')()],
}
Example
import { Features } from 'lightningcss'
export default {
plugins: [
LightningCSS({
options: {
include: Features.Nesting,
},
}),
],
}