Using vith Vite
Sugarcss is the perfect companion of Vite to build your next web project. Follow these simple steps to get started:
Installation
To use lightningcss with Vite, first install the vite package like so:
npm i vite @lotsof/sugarcss -D
Configuration
Then, create a vite.config.js
file at the root of your project with the following content:
import { sugarize } from '@lotsof/sugarcss';
export default {
css: {
transformer: 'lightningcss',
lightningcss: sugarize({}),
},
build: {
cssMinify: true,
},
};
Usage
You can now start your vite server like normal and take advantage of all the great features of Sugarcss:
vite