Files
SnowLuma/.pnpm-store/v11/files/b6/0d9972c505184be96ad84bc7cfe28768a641ba424b0e2388de197dc6b15992647fc25d061cca863196b6f6972ef8f5750c07a50d424a260691d893db73656f
T
TanTan 2a69b23b47
Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

48 lines
1.8 KiB
Plaintext

import { Plugin } from "vite";
import { ReactCompilerBabelPluginOptions, RolldownBabelPreset } from "#optionalTypes";
//#region src/reactCompilerPreset.d.ts
declare const reactCompilerPreset: (options?: Pick<ReactCompilerBabelPluginOptions, "compilationMode" | "target">) => RolldownBabelPreset;
//#endregion
//#region src/index.d.ts
interface Options {
/**
* Can be used to process extra files like `.mdx`
* @example include: /\.(mdx|js|jsx|ts|tsx)$/
* @default /\.[tj]sx?$/
*/
include?: string | RegExp | Array<string | RegExp>;
/**
* Can be used to exclude JSX/TSX files that runs in a worker or are not React files.
* Except if explicitly desired, you should keep node_modules in the exclude list
* @example exclude: [/\/pdf\//, /\.solid\.tsx$/, /\/node_modules\//]
* @default /\/node_modules\//
*/
exclude?: string | RegExp | Array<string | RegExp>;
/**
* Control where the JSX factory is imported from.
* https://oxc.rs/docs/guide/usage/transformer/jsx.html#import-source
* @default 'react'
*/
jsxImportSource?: string;
/**
* Note: Skipping React import with classic runtime is not supported from v4
* @default "automatic"
*/
jsxRuntime?: 'classic' | 'automatic';
/**
* React Fast Refresh runtime URL prefix.
* Useful in a module federation context to enable HMR by specifying
* the host application URL in the Vite config of a remote application.
* @example
* reactRefreshHost: 'http://localhost:3000'
*/
reactRefreshHost?: string;
}
declare function viteReact(opts?: Options): Plugin[];
declare namespace viteReact {
var preambleCode: string;
}
declare function viteReactForCjs(this: unknown, options: Options): Plugin[];
//#endregion
export { Options, viteReact as default, viteReactForCjs as "module.exports", reactCompilerPreset };