Skip to content

Commit

Permalink
Variabelnavn
Browse files Browse the repository at this point in the history
  • Loading branch information
anders-nom committed Jun 27, 2024
1 parent d382393 commit 412e0ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions packages/server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,7 @@ app.get("/env", async ({ req, json }) => {
//TODO: Add css?
});
});
app.get("/client.js", async ({ redirect }) =>
redirect(csrAssets.hydrationScriptUrl),
);
app.get("/client.js", async ({ redirect }) => redirect(csrAssets.csrScriptUrl));
app.get("/css/client.css", async ({ redirect }) => redirect(csrAssets.cssUrl));
app.get("/", async ({ req, html }) => {
const data = validParams(req.query());
Expand Down
4 changes: 2 additions & 2 deletions packages/server/src/views/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const getCSSUrl = async () => {
return cdnUrl(manifest["src/main.ts"].css[0]);
};

const getCSRHydrationScriptUrl = async () => {
const getCSRScriptUrl = async () => {
const csrManifest = (
await import("decorator-client/dist/.vite/csr.manifest.json")
).default;
Expand Down Expand Up @@ -113,7 +113,7 @@ const scriptsAsString = scriptsProps.map(buildHtmlElementString).join("");

export const csrAssets = {
cssUrl: await getCSSUrl(),
hydrationScriptUrl: await getCSRHydrationScriptUrl(),
csrScriptUrl: await getCSRScriptUrl(),
mainScriptsProps: scriptsProps,
};

Expand Down

0 comments on commit 412e0ca

Please sign in to comment.