@taujs/server 0.1.3 → 0.1.4

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.
Files changed (2) hide show
  1. package/dist/index.js +4 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -378,7 +378,10 @@ var SSRServer = (0, import_fastify_plugin.default)(
378
378
  const initialDataResolved = await initialDataPromise;
379
379
  const initialDataScript = `<script>window.__INITIAL_DATA__ = ${JSON.stringify(initialDataResolved).replace(/</g, "\\u003c")}</script>`;
380
380
  const { headContent, appHtml } = await renderSSR(initialDataResolved, req.url, attr?.meta);
381
- const fullHtml = template.replace(SSRTAG.ssrHead, headContent).replace(SSRTAG.ssrHtml, `${appHtml}${initialDataScript}<script type="module" src="${bootstrapModules}" async=""></script>`);
381
+ let aggregateHeadContent = headContent;
382
+ if (ssrManifest) aggregateHeadContent += preloadLinks;
383
+ if (manifest) aggregateHeadContent += cssLinks;
384
+ const fullHtml = template.replace(SSRTAG.ssrHead, aggregateHeadContent).replace(SSRTAG.ssrHtml, `${appHtml}${initialDataScript}<script type="module" src="${bootstrapModules}" async=""></script>`);
382
385
  return reply.status(200).header("Content-Type", "text/html").send(fullHtml);
383
386
  } else {
384
387
  const { renderStream } = renderModule;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taujs/server",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "taujs | τjs",
5
5
  "author": "Aoede <taujs@aoede.uk.net> (https://www.aoede.uk.net)",
6
6
  "license": "MIT",