File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 11import { dirname , join } from 'node:path'
22import { fileURLToPath } from 'node:url'
33import { readFileSync } from 'node:fs'
4- import type { BuildOptions , Plugin , PluginOption } from 'vite'
4+ import type { BuildOptions , Plugin } from 'vite'
55import {
66 addRefreshWrapper ,
77 avoidSourceMapOption ,
@@ -30,7 +30,7 @@ export interface Options {
3030
3131const defaultIncludeRE = / \. [ t j ] s x ? (?: $ | \? ) /
3232
33- export default function viteReact ( opts : Options = { } ) : PluginOption [ ] {
33+ export default function viteReact ( opts : Options = { } ) : Plugin [ ] {
3434 const include = opts . include ?? defaultIncludeRE
3535 const exclude = [
3636 ...( Array . isArray ( opts . exclude )
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import {
1111 type Options as SWCOptions ,
1212 transform ,
1313} from '@swc/core'
14- import type { PluginOption } from 'vite'
14+ import type { Plugin } from 'vite'
1515import {
1616 addRefreshWrapper ,
1717 getPreambleCode ,
@@ -83,7 +83,7 @@ type Options = {
8383 disableOxcRecommendation ?: boolean
8484}
8585
86- const react = ( _options ?: Options ) : PluginOption [ ] => {
86+ const react = ( _options ?: Options ) : Plugin [ ] => {
8787 let hmrDisabled = false
8888 const options = {
8989 jsxImportSource : _options ?. jsxImportSource ?? 'react' ,
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import type * as babelCore from '@babel/core'
55import type { ParserOptions , TransformOptions } from '@babel/core'
66import { createFilter } from 'vite'
77import * as vite from 'vite'
8- import type { Plugin , PluginOption , ResolvedConfig } from 'vite'
8+ import type { Plugin , ResolvedConfig } from 'vite'
99import {
1010 addRefreshWrapper ,
1111 getPreambleCode ,
@@ -109,7 +109,7 @@ export type ViteReactPluginApi = {
109109const defaultIncludeRE = / \. [ t j ] s x ? $ /
110110const tsRE = / \. t s x ? $ /
111111
112- export default function viteReact ( opts : Options = { } ) : PluginOption [ ] {
112+ export default function viteReact ( opts : Options = { } ) : Plugin [ ] {
113113 const include = opts . include ?? defaultIncludeRE
114114 const exclude = opts . exclude
115115 const filter = createFilter ( include , exclude )
You can’t perform that action at this time.
0 commit comments