@ui-organized/react-vite
v2.0.0
Published
Vite plugin for the ui-organized design system: validates a theme config, runs the token pipeline, and injects CSS variables at build time and during dev with HMR.
Maintainers
Readme
@ui-organized/react-vite
Vite plugin for the ui-organized design system. It reads a theme config
JSON file, validates it against @ui-organized/schema,
runs the token pipeline, and injects the resulting CSS custom properties into
your build — both at build time and during the dev server with HMR.
Install
npm install -D @ui-organized/react-vitevite (>=5) is a peer dependency.
Usage
// vite.config.ts
import { themePlugin } from "@ui-organized/react-vite";
export default {
plugins: [
themePlugin({ config: "./theme.json" }),
],
};The generated tokens are exposed via the virtual module
virtual:@ui-organized/theme and emitted as ds-theme.css in the build output.
Editing theme.json during development triggers a token rebuild and reload.
License
Apache-2.0
