With Vite
Installโ
- Yarn
- NPM
yarn add --dev @griffel/tag-processor @griffel/vite-plugin
npm install --save-dev @griffel/tag-processor @griffel/vite-plugin
Usageโ
After installation, add the plugin to your vite.config.js
:
import { defineConfig } from 'vite';
import griffel from '@griffel/vite-plugin';
export default defineConfig(({ command }) => ({
// ...
plugins: [
// We recommend using the plugin only in production builds to get optimized output
command === 'build' && griffel(),
],
}));