@revojs/vue 0.1.11 → 0.1.12
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/client/index.js
CHANGED
|
@@ -88,13 +88,15 @@ async function $fetch(scope, input, options) {
|
|
|
88
88
|
if (import.meta.server) {
|
|
89
89
|
const { states, request, variables } = useServer(scope);
|
|
90
90
|
const next = new Scope();
|
|
91
|
+
const url = new URL(input.toString(), request.url);
|
|
91
92
|
next.setContext(SERVER_CONTEXT, {
|
|
92
93
|
states,
|
|
93
|
-
request: new Request(
|
|
94
|
+
request: new Request(url, options),
|
|
94
95
|
response: { headers: new Headers() },
|
|
95
96
|
variables
|
|
96
97
|
});
|
|
97
|
-
|
|
98
|
+
const previous = new URL(request.url);
|
|
99
|
+
if (url.origin === previous.origin) response = await (await import("#virtual/server")).default.fetch(next);
|
|
98
100
|
}
|
|
99
101
|
response ??= await fetch(input, options);
|
|
100
102
|
if (response.ok === false) throw response;
|
package/dist/index.js
CHANGED