@absolutejs/absolute 0.19.0-beta.224 → 0.19.0-beta.225

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/index.js CHANGED
@@ -217,8 +217,13 @@ var CONVENTIONS_KEY = "__absoluteConventions", getMap = () => globalThis[CONVENT
217
217
  const app = createSSRApp({
218
218
  render: () => h(ErrorComponent, errorProps)
219
219
  });
220
- const body = await renderToString(app);
221
- const html = `<!DOCTYPE html><html><head></head><body><div id="root">${body}</div></body></html>`;
220
+ let body = await renderToString(app);
221
+ let styles = "";
222
+ body = body.replace(/<style>([\s\S]*?)<\/style>/g, (_, css) => {
223
+ styles += `<style>${css.replace(/&quot;/g, '"').replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">")}</style>`;
224
+ return "";
225
+ });
226
+ const html = `<!DOCTYPE html><html><head>${styles}</head><body><div id="root">${body}</div></body></html>`;
222
227
  return new Response(html, {
223
228
  headers: { "Content-Type": "text/html" },
224
229
  status: 500
@@ -276,8 +281,13 @@ var CONVENTIONS_KEY = "__absoluteConventions", getMap = () => globalThis[CONVENT
276
281
  const app = createSSRApp({
277
282
  render: () => h(NotFoundComponent)
278
283
  });
279
- const body = await renderToString(app);
280
- const html = `<!DOCTYPE html><html><head></head><body><div id="root">${body}</div></body></html>`;
284
+ let body = await renderToString(app);
285
+ let styles = "";
286
+ body = body.replace(/<style>([\s\S]*?)<\/style>/g, (_, css) => {
287
+ styles += `<style>${css.replace(/&quot;/g, '"').replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">")}</style>`;
288
+ return "";
289
+ });
290
+ const html = `<!DOCTYPE html><html><head>${styles}</head><body><div id="root">${body}</div></body></html>`;
281
291
  return new Response(html, {
282
292
  headers: { "Content-Type": "text/html" },
283
293
  status: 404
@@ -178327,5 +178337,5 @@ export {
178327
178337
  ANGULAR_INIT_TIMEOUT_MS
178328
178338
  };
178329
178339
 
178330
- //# debugId=2DBD112ED081E22264756E2164756E21
178340
+ //# debugId=E6CAD30CAF93B30A64756E2164756E21
178331
178341
  //# sourceMappingURL=index.js.map