@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 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
- appHtml = await render(url, { Component });
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
- appHtml = await render(url);
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) {