Skip to main content

With Vite

Installโ€‹

yarn add --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(),
],
}));