eddev 2.0.0-beta.34 → 2.0.0-beta.36
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.
|
@@ -123,7 +123,7 @@ export function BrowserRouter(props) {
|
|
|
123
123
|
}
|
|
124
124
|
internals.poppedState = (href, data) => {
|
|
125
125
|
const stack = state.history;
|
|
126
|
-
console.log("Popped state", stack)
|
|
126
|
+
// console.log("Popped state", stack)
|
|
127
127
|
// Is the route in our history stack? (going back)
|
|
128
128
|
const index = stack.findIndex((item) => item.id === data.id);
|
|
129
129
|
if (index >= 0) {
|
|
@@ -396,7 +396,7 @@ export function BrowserRouter(props) {
|
|
|
396
396
|
// Handle popState
|
|
397
397
|
// const router = useRouterStore.getState()
|
|
398
398
|
const onPopState = (e) => {
|
|
399
|
-
console.log("Popped", e.state)
|
|
399
|
+
// console.log("Popped", e.state)
|
|
400
400
|
internals.poppedState?.(document.location.href, e.state ?? {});
|
|
401
401
|
};
|
|
402
402
|
window.addEventListener("popstate", onPopState);
|
|
@@ -9,8 +9,10 @@ export async function renderPageToSSRStream(pathname, initialData, serverContext
|
|
|
9
9
|
const assets = await clientManifest.inputs[clientManifest.handler].assets();
|
|
10
10
|
const jsx = (_jsx(SSRRoot, { assets: _jsx(Suspense, { children: assets.map((m) => renderAsset(m)) }), metaTags: initialData?.meta?.head || [], pathname: pathname, initialData: initialData, loader: new RouteLoader() }));
|
|
11
11
|
const stream = await new Promise(async (resolve, reject) => {
|
|
12
|
+
// console.log("Rendering to pipable")
|
|
12
13
|
const stream = renderToPipeableStream(jsx, {
|
|
13
14
|
onShellReady() {
|
|
15
|
+
// console.log("Shell ready")
|
|
14
16
|
resolve(stream);
|
|
15
17
|
},
|
|
16
18
|
onShellError(err) {
|
|
@@ -22,7 +24,7 @@ export async function renderPageToSSRStream(pathname, initialData, serverContext
|
|
|
22
24
|
console.error(err);
|
|
23
25
|
},
|
|
24
26
|
bootstrapModules: [clientManifest.inputs[clientManifest.handler].output.path],
|
|
25
|
-
bootstrapScriptContent: `window._PAGE_DATA = ${JSON.stringify(initialData)};`,
|
|
27
|
+
bootstrapScriptContent: `window.manifest = ${JSON.stringify(await clientManifest.json())};\nwindow._PAGE_DATA = ${JSON.stringify(initialData)};`,
|
|
26
28
|
});
|
|
27
29
|
});
|
|
28
30
|
return stream;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "2.0.0-beta.
|
|
1
|
+
export declare const VERSION = "2.0.0-beta.36";
|
package/dist/node/cli/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "2.0.0-beta.
|
|
1
|
+
export const VERSION = "2.0.0-beta.36";
|
|
@@ -35,13 +35,17 @@ export function createVinxiApp(args) {
|
|
|
35
35
|
},
|
|
36
36
|
"/wp-content/**": { proxy: joinURL(args.origin, "wp-content/**") },
|
|
37
37
|
"/wp-includes/**": { proxy: joinURL(args.origin, "wp-includes/**") },
|
|
38
|
-
"/_data/**": {
|
|
38
|
+
"/_data/route/**": {
|
|
39
|
+
isr: 300,
|
|
40
|
+
swr: true,
|
|
41
|
+
},
|
|
42
|
+
"/_data/query/**": {
|
|
39
43
|
isr: 300,
|
|
40
44
|
swr: true,
|
|
41
45
|
cache: {
|
|
42
46
|
maxAge: 300,
|
|
43
47
|
swr: true,
|
|
44
|
-
varies: ["Authorization"],
|
|
48
|
+
varies: ["Authorization", "woocommerce-session"],
|
|
45
49
|
},
|
|
46
50
|
},
|
|
47
51
|
"/**/*": {
|
|
@@ -50,7 +54,6 @@ export function createVinxiApp(args) {
|
|
|
50
54
|
cache: {
|
|
51
55
|
maxAge: 300,
|
|
52
56
|
swr: true,
|
|
53
|
-
varies: ["Authorization"],
|
|
54
57
|
},
|
|
55
58
|
},
|
|
56
59
|
},
|