@cdx-ui/web
v0.0.1-beta.179
Published
Vite integration for using Forge UI in React web applications.
Readme
@cdx-ui/web
Vite integration for using Forge UI in React web applications.
Installation
Install @cdx-ui/web at the same version as your other Forge UI packages:
npm install --save-dev @cdx-ui/web vite @tailwindcss/vite tailwindcss uniwindConfigure Vite
Add forge() before the React plugin and point it at your application's CSS entry file:
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { forge } from '@cdx-ui/web/vite';
export default defineConfig({
plugins: [forge({ cssEntryFile: 'src/index.css' }), react()],
});forge() configures Tailwind and Uniwind, React Native Web resolution, dependency pre-bundling,
and compatibility settings required by Forge UI.
Options
| Option | Type | Default | Description |
| --------------- | --------- | ------- | ------------------------------------------------------ |
| cssEntryFile | string | — | Relative path to the application's CSS entry file. |
| patchWorklets | boolean | true | Applies the React Native Worklets compatibility patch. |
