UNPKG

vite-plugin-react-server

Version:
19 lines 874 B
import type { Plugin as VitePlugin } from "vite"; /** * Bundling with vite may have some side effects, this plugin is a workaround to prevent * the side effects from happening to the files we want to preserve. It's used as a plugin * to build this plugin, but you can also use it as a standalone plugin for your projects to have * the same effect. * @example * ```tsx * import { filePreserverPlugin } from "vite-plugin-react-server/file-preserver"; * * export default defineConfig({ * plugins: [filePreserverPlugin("utils/env")], // don't include the extension * }); * ``` * The typescript file will not be transformed by vite, only by esbuild, so you can preserve your import.meta.env * and use it in your client boundary files. */ export declare function filePreserverPlugin(fileName: string | string[]): VitePlugin[]; //# sourceMappingURL=plugin.d.ts.map