@vitejs/plugin-react 4.2.0 → 4.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.cts +8 -12
- package/dist/index.d.mts +8 -12
- package/dist/index.d.ts +8 -12
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { TransformOptions, ParserOptions } from '@babel/core';
|
2
|
-
import {
|
2
|
+
import { PluginOption, ResolvedConfig } from 'vite';
|
3
3
|
|
4
4
|
interface Options {
|
5
5
|
include?: string | RegExp | Array<string | RegExp>;
|
@@ -40,19 +40,15 @@ type ReactBabelHookContext = {
|
|
40
40
|
ssr: boolean;
|
41
41
|
id: string;
|
42
42
|
};
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
reactBabel?: ReactBabelHook;
|
50
|
-
};
|
51
|
-
}
|
52
|
-
}
|
43
|
+
type ViteReactPluginApi = {
|
44
|
+
/**
|
45
|
+
* Manipulate the Babel options of `@vitejs/plugin-react`
|
46
|
+
*/
|
47
|
+
reactBabel?: ReactBabelHook;
|
48
|
+
};
|
53
49
|
declare function viteReact(opts?: Options): PluginOption[];
|
54
50
|
declare namespace viteReact {
|
55
51
|
var preambleCode: string;
|
56
52
|
}
|
57
53
|
|
58
|
-
export { type BabelOptions, type Options, type ReactBabelOptions, viteReact as default };
|
54
|
+
export { type BabelOptions, type Options, type ReactBabelOptions, type ViteReactPluginApi, viteReact as default };
|
package/dist/index.d.mts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { TransformOptions, ParserOptions } from '@babel/core';
|
2
|
-
import {
|
2
|
+
import { PluginOption, ResolvedConfig } from 'vite';
|
3
3
|
|
4
4
|
interface Options {
|
5
5
|
include?: string | RegExp | Array<string | RegExp>;
|
@@ -40,19 +40,15 @@ type ReactBabelHookContext = {
|
|
40
40
|
ssr: boolean;
|
41
41
|
id: string;
|
42
42
|
};
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
reactBabel?: ReactBabelHook;
|
50
|
-
};
|
51
|
-
}
|
52
|
-
}
|
43
|
+
type ViteReactPluginApi = {
|
44
|
+
/**
|
45
|
+
* Manipulate the Babel options of `@vitejs/plugin-react`
|
46
|
+
*/
|
47
|
+
reactBabel?: ReactBabelHook;
|
48
|
+
};
|
53
49
|
declare function viteReact(opts?: Options): PluginOption[];
|
54
50
|
declare namespace viteReact {
|
55
51
|
var preambleCode: string;
|
56
52
|
}
|
57
53
|
|
58
|
-
export { type BabelOptions, type Options, type ReactBabelOptions, viteReact as default };
|
54
|
+
export { type BabelOptions, type Options, type ReactBabelOptions, type ViteReactPluginApi, viteReact as default };
|
package/dist/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { TransformOptions, ParserOptions } from '@babel/core';
|
2
|
-
import {
|
2
|
+
import { PluginOption, ResolvedConfig } from 'vite';
|
3
3
|
|
4
4
|
interface Options {
|
5
5
|
include?: string | RegExp | Array<string | RegExp>;
|
@@ -40,19 +40,15 @@ type ReactBabelHookContext = {
|
|
40
40
|
ssr: boolean;
|
41
41
|
id: string;
|
42
42
|
};
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
reactBabel?: ReactBabelHook;
|
50
|
-
};
|
51
|
-
}
|
52
|
-
}
|
43
|
+
type ViteReactPluginApi = {
|
44
|
+
/**
|
45
|
+
* Manipulate the Babel options of `@vitejs/plugin-react`
|
46
|
+
*/
|
47
|
+
reactBabel?: ReactBabelHook;
|
48
|
+
};
|
53
49
|
declare function viteReact(opts?: Options): PluginOption[];
|
54
50
|
declare namespace viteReact {
|
55
51
|
var preambleCode: string;
|
56
52
|
}
|
57
53
|
|
58
|
-
export { type BabelOptions, type Options, type ReactBabelOptions, viteReact as default };
|
54
|
+
export { type BabelOptions, type Options, type ReactBabelOptions, type ViteReactPluginApi, viteReact as default };
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vitejs/plugin-react",
|
3
|
-
"version": "4.2.
|
3
|
+
"version": "4.2.1",
|
4
4
|
"license": "MIT",
|
5
5
|
"author": "Evan You",
|
6
6
|
"contributors": [
|
@@ -38,10 +38,10 @@
|
|
38
38
|
},
|
39
39
|
"homepage": "https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react#readme",
|
40
40
|
"dependencies": {
|
41
|
-
"@babel/core": "^7.23.
|
41
|
+
"@babel/core": "^7.23.5",
|
42
42
|
"@babel/plugin-transform-react-jsx-self": "^7.23.3",
|
43
43
|
"@babel/plugin-transform-react-jsx-source": "^7.23.3",
|
44
|
-
"@types/babel__core": "^7.20.
|
44
|
+
"@types/babel__core": "^7.20.5",
|
45
45
|
"react-refresh": "^0.14.0"
|
46
46
|
},
|
47
47
|
"peerDependencies": {
|