import react from "@vitejs/plugin-react"; import { PluginOption } from "vite"; //#region src/vite/index.d.ts type ReactOptions = Parameters[0]; interface ReactUnityOptions { /** * The Unity project to build into, absolute or relative to the Vite root. Discovered by * walking up from the Vite root when omitted. */ unityProject?: string; /** Output folder inside the Unity project. Defaults to `Assets/Resources/react`. */ assetPath?: string; /** Empty the output directory before each build, keeping its `.meta` files. Default `true`. */ clean?: boolean; /** Paths inside the output directory, relative to it, that the clean never deletes. */ preserve?: readonly string[]; /** * Content hashes in output filenames. Default `false`: a hash renames the file on every * build, which costs it its `.meta` and so its Unity GUID. */ hashFileNames?: boolean; /** Options for `@vitejs/plugin-react`, or `false` to add the React plugin yourself. */ react?: ReactOptions | false; /** * Resolve a bare `@import "tailwindcss"` to `@reactunity/renderer/tailwind.css`, which is the * same thing with a Preflight written for what ReactUnity renders. Default `true`; `false` * leaves the import alone. Only the bare specifier is aliased -- `tailwindcss/theme.css` and * the rest keep resolving to the package, which is where that entry gets them from. */ tailwind?: boolean; /** * Serve the previewer -- a Unity WebGL player running this app -- at `previewer/` on the dev * server, and send a browser that opens the root there. Default `true`, which uses the hosted * player unless a `previewer/index.html` of your own sits next to the Vite root. A string names * that folder instead, relative to the root; `false` turns the previewer off. */ previewer?: boolean | string; } /** * Vite preset for a ReactUnity app: React Fast Refresh, output into the Unity project's * `Assets/Resources/react`, a clean that keeps Unity's `.meta` files, and a Tailwind entry with * ReactUnity's Preflight in place of the browser one. * * ```ts * export default defineConfig({ plugins: [reactUnity()] }); * ``` */ declare function reactUnity(options?: ReactUnityOptions): PluginOption[]; //#endregion export { ReactUnityOptions, reactUnity as default, reactUnity }; //# sourceMappingURL=vite.d.mts.map