Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork4
Lightning CSS integration for Vite, Rollup, esbuild, Webpack, Vue CLI, and more.
License
NotificationsYou must be signed in to change notification settings
unplugin/unplugin-lightningcss
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Lightning CSS integration for Vite, Rollup, esbuild, Webpack, Vue CLI, and more.
npm i -D unplugin-lightningcss
Vite
// vite.config.tsimportLightningCSSfrom'unplugin-lightningcss/vite'exportdefaultdefineConfig({plugins:[LightningCSS()],})
Rollup
Since Rollup does not support CSS out of the box, you need to use a CSS plugin likerollup-plugin-css-only.
// rollup.config.jsimportcssfrom'rollup-plugin-css-only'importLightningCSSfrom'unplugin-lightningcss/rollup'exportdefault{plugins:[LightningCSS(),css()],}
esbuild
// esbuild.config.jsimport{build}from'esbuild'build({plugins:[require('unplugin-lightningcss/esbuild')()],})
Webpack
// webpack.config.jsmodule.exports={/* ... */plugins:[require('unplugin-lightningcss/webpack')()],}
import{Features}from'lightningcss'exportdefault{plugins:[LightningCSS({options:{include:Features.Nesting,},/** * Whether to export the transformed CSS as a default string export. *@default false */asString:false,}),],}
MIT License © 2023-PRESENTKevin Deng
About
Lightning CSS integration for Vite, Rollup, esbuild, Webpack, Vue CLI, and more.
Resources
License
Code of conduct
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Contributors5
Uh oh!
There was an error while loading.Please reload this page.