@flight-framework/cli 0.3.0 → 0.3.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/bin.js +4 -2
- package/dist/bin.js.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/package.json +51 -51
- package/LICENSE +0 -21
package/dist/index.js
CHANGED
|
@@ -1017,14 +1017,16 @@ async function startSSRServer(vite, root, port, host) {
|
|
|
1017
1017
|
const Component = mod.default;
|
|
1018
1018
|
const { render } = await vite.ssrLoadModule("/src/entry-server.tsx");
|
|
1019
1019
|
if (typeof render === "function" && Component) {
|
|
1020
|
-
|
|
1020
|
+
const request = new Request(new URL(url, `http://${req.headers.host || "localhost"}`).href);
|
|
1021
|
+
appHtml = await render({ url, request, Component });
|
|
1021
1022
|
}
|
|
1022
1023
|
}
|
|
1023
1024
|
}
|
|
1024
1025
|
if (!appHtml) {
|
|
1025
1026
|
const { render } = await vite.ssrLoadModule("/src/entry-server.tsx");
|
|
1026
1027
|
if (typeof render === "function") {
|
|
1027
|
-
|
|
1028
|
+
const request = new Request(new URL(url, `http://${req.headers.host || "localhost"}`).href);
|
|
1029
|
+
appHtml = await render({ url, request });
|
|
1028
1030
|
}
|
|
1029
1031
|
}
|
|
1030
1032
|
if (appHtml) {
|