vike-lite-react 1.0.8 → 1.0.10
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.
|
@@ -38,6 +38,7 @@ function RouterApp(props) {
|
|
|
38
38
|
const matchedRoute = useMemo(() => matchRoute(currentPathname, props.routes), [currentPathname, props.routes]);
|
|
39
39
|
useEffect(() => {
|
|
40
40
|
const handleLinkClick = (e) => {
|
|
41
|
+
if (!(e.target instanceof Element)) return;
|
|
41
42
|
const target = e.target.closest("a");
|
|
42
43
|
if (!target?.href || target.target === "_blank" || e.ctrlKey || e.metaKey || e.altKey || e.shiftKey) return;
|
|
43
44
|
const url = new URL(target.href);
|
|
@@ -65,6 +66,7 @@ function RouterApp(props) {
|
|
|
65
66
|
}
|
|
66
67
|
}
|
|
67
68
|
const handleLinkPrefetch = (e) => {
|
|
69
|
+
if (!(e.target instanceof Element)) return;
|
|
68
70
|
const target = e.target.closest("a");
|
|
69
71
|
if (!target?.href) return;
|
|
70
72
|
if (target.target && target.target !== "_self") return;
|
|
@@ -299,4 +301,4 @@ async function onRenderClient(clientOptions) {
|
|
|
299
301
|
}
|
|
300
302
|
}
|
|
301
303
|
//#endregion
|
|
302
|
-
export { onRenderClient
|
|
304
|
+
export { onRenderClient };
|
package/dist/vite.mjs
CHANGED
|
@@ -13,7 +13,7 @@ function vikeLiteReact({ hydration = true, react: reactOptions } = {}) {
|
|
|
13
13
|
if (id === virtualServerId) return resolvedVirtualServerId;
|
|
14
14
|
},
|
|
15
15
|
load(id) {
|
|
16
|
-
if (id === resolvedVirtualClientId) return `export const onRenderClient
|
|
16
|
+
if (id === resolvedVirtualClientId) return `export const onRenderClient=async(options)=>(await import("vike-lite-react/__internal/client/onRenderClient")).onRenderClient({...options,hydration:${hydration}});`;
|
|
17
17
|
if (id === resolvedVirtualServerId) return `import { onRenderHtml as _onRenderHtml } from 'vike-lite-react/__internal/server/onRenderHtml';export const onRenderHtml = (ctx) => _onRenderHtml({ ...ctx, hydration: ${hydration} });`;
|
|
18
18
|
}
|
|
19
19
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vike-lite-react",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"react": "^19.2.7",
|
|
64
64
|
"react-dom": "^19.2.7",
|
|
65
65
|
"tsdown": "^0.22.8",
|
|
66
|
-
"vike-lite": "1.15.
|
|
66
|
+
"vike-lite": "1.15.6",
|
|
67
67
|
"vite": "^8.1.5"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|