vike-lite-react 1.0.0 → 1.0.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/vite.d.mts +1 -1
- package/dist/vite.mjs +9 -6
- package/package.json +2 -2
package/dist/vite.d.mts
CHANGED
|
@@ -12,6 +12,6 @@ interface VikeLiteReactOptions {
|
|
|
12
12
|
*/
|
|
13
13
|
react?: Options;
|
|
14
14
|
}
|
|
15
|
-
declare function vikeLiteReact(
|
|
15
|
+
declare function vikeLiteReact({ hydration, react: reactOptions }?: VikeLiteReactOptions): Plugin[];
|
|
16
16
|
//#endregion
|
|
17
17
|
export { VikeLiteReactOptions, vikeLiteReact as default };
|
package/dist/vite.mjs
CHANGED
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
import react from "@vitejs/plugin-react";
|
|
2
2
|
//#region src/vite-plugin.ts
|
|
3
|
-
function vikeLiteReact(
|
|
4
|
-
const { hydration = true, react: reactOptions } = options;
|
|
3
|
+
function vikeLiteReact({ hydration = true, react: reactOptions } = {}) {
|
|
5
4
|
const virtualConfigId = "virtual:vike-lite/config";
|
|
6
|
-
const
|
|
5
|
+
const virtualClientId = "virtual:vike-lite/client";
|
|
6
|
+
const virtualServerId = "virtual:vike-lite/server";
|
|
7
7
|
const resolvedVirtualConfigId = "\0virtual:vike-lite/config";
|
|
8
|
-
const
|
|
8
|
+
const resolvedVirtualClientId = "\0virtual:vike-lite/client";
|
|
9
|
+
const resolvedVirtualServerId = "\0virtual:vike-lite/server";
|
|
9
10
|
const adapter = {
|
|
10
11
|
name: "vike-lite-react",
|
|
11
12
|
enforce: "pre",
|
|
12
13
|
resolveId(id) {
|
|
13
14
|
if (id === virtualConfigId) return resolvedVirtualConfigId;
|
|
14
|
-
if (id ===
|
|
15
|
+
if (id === virtualClientId) return resolvedVirtualClientId;
|
|
16
|
+
if (id === virtualServerId) return resolvedVirtualServerId;
|
|
15
17
|
},
|
|
16
18
|
load(id) {
|
|
17
19
|
if (id === resolvedVirtualConfigId) return `export const hydration = ${JSON.stringify(hydration)};`;
|
|
18
|
-
if (id ===
|
|
20
|
+
if (id === resolvedVirtualClientId) return "export const onRenderClient=()=>import(\"vike-lite-react/__internal/client/onRenderClient\");";
|
|
21
|
+
if (id === resolvedVirtualServerId) return `export { onRenderHtml } from 'vike-lite-react/__internal/server/onRenderHtml';`;
|
|
19
22
|
}
|
|
20
23
|
};
|
|
21
24
|
return [...react(reactOptions), adapter];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vike-lite-react",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"react": "^19.2.7",
|
|
47
47
|
"react-dom": "^19.2.7",
|
|
48
48
|
"tsdown": "^0.22.5",
|
|
49
|
-
"vike-lite": "1.13.
|
|
49
|
+
"vike-lite": "1.13.2",
|
|
50
50
|
"vite": "^8.1.4"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|