bun-plugin-stx 0.2.846 → 0.2.849
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/serve.js +5 -3
- package/package.json +3 -3
package/dist/serve.js
CHANGED
|
@@ -8755,7 +8755,7 @@ var defaultConfigDir4 = /* @__PURE__ */ resolve12(process19.cwd(), "config");
|
|
|
8755
8755
|
var defaultGeneratedDir4 = /* @__PURE__ */ resolve12(process19.cwd(), "src/generated");
|
|
8756
8756
|
|
|
8757
8757
|
// src/serve.ts
|
|
8758
|
-
import { BUILD_ID_HEADER, decodeTitleEntities, externalScriptsOutsideContainer, extractPageResponseStatus, findContainerRegion, FRAGMENT_CACHE_CONTROL, getBuildId, mergeCssConfig, pageHeadFragment, readResponseHeaders, readResponseStatus, renderFontCSS, SPA_NAV_HEADER, spaNavVaryHeaders, stateDir, stateDirName } from "@stacksjs/stx";
|
|
8758
|
+
import { BUILD_ID_HEADER, decodeTitleEntities, externalScriptsOutsideContainer, extractPageResponseStatus, findContainerRegion, FRAGMENT_CACHE_CONTROL, getBuildId, mergeCssConfig, pageCssFragment, pageHeadFragment, readResponseHeaders, readResponseStatus, renderFontCSS, SPA_NAV_HEADER, spaNavVaryHeaders, stateDir, stateDirName } from "@stacksjs/stx";
|
|
8759
8759
|
import { buildCodeFrame, locateFailureLine } from "@stacksjs/stx/build-message";
|
|
8760
8760
|
import { clearBundleFailures, getBundleFailures } from "@stacksjs/stx/client-script-bundler";
|
|
8761
8761
|
import { actionRedirectResponse, compressResponse, runPageAction as sharedRunPageAction } from "@stacksjs/stx";
|
|
@@ -11095,6 +11095,8 @@ ${block}`;
|
|
|
11095
11095
|
let fragmentMetadata = fragmentHead ? `<head>${fragmentHead[1]}</head>` : null;
|
|
11096
11096
|
if (fragmentHead)
|
|
11097
11097
|
html = html.slice(fragmentHead[0].length);
|
|
11098
|
+
const fragmentCss = fragmentHead ? /^<template data-stx-page-css="1">[\s\S]*?<\/template>\n?/.exec(html)?.[0] ?? "" : "";
|
|
11099
|
+
html = html.slice(fragmentCss.length);
|
|
11098
11100
|
if (siteConfig && stx.injectThemeBootstrap)
|
|
11099
11101
|
html = stx.injectThemeBootstrap(html, siteConfig);
|
|
11100
11102
|
if (siteConfig && stx.injectSeo) {
|
|
@@ -11135,7 +11137,7 @@ ${block}`;
|
|
|
11135
11137
|
}
|
|
11136
11138
|
html = ensureRouterConfig(html);
|
|
11137
11139
|
if (fragmentMetadata !== null)
|
|
11138
|
-
html = pageHeadFragment(fragmentMetadata) + html;
|
|
11140
|
+
html = pageHeadFragment(fragmentMetadata) + fragmentCss + html;
|
|
11139
11141
|
const headers = new Headers(res.headers);
|
|
11140
11142
|
if (fragmentHead && i18nConfig)
|
|
11141
11143
|
headers.set("X-STX-Layout-Group", `i18n:${locale}`);
|
|
@@ -11762,7 +11764,7 @@ ${block}`;
|
|
|
11762
11764
|
const inlinePageScripts = pageSetupScripts.filter((script) => !externalPageScripts.includes(script));
|
|
11763
11765
|
const componentFactoryScripts = inlinePageScripts.filter((script) => script.includes("data-stx-component-factories"));
|
|
11764
11766
|
const trailingPageScripts = inlinePageScripts.filter((script) => !script.includes("data-stx-component-factories"));
|
|
11765
|
-
fragment = `${pageHeadFragment(content)}${headStyles.join(`
|
|
11767
|
+
fragment = `${pageHeadFragment(content)}${pageCssFragment(content)}${headStyles.join(`
|
|
11766
11768
|
`)}
|
|
11767
11769
|
${externalPageScripts.join(`
|
|
11768
11770
|
`)}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bun-plugin-stx",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.849",
|
|
5
5
|
"description": "A Bun plugin that allows for using Laravel Blade-like syntax.",
|
|
6
6
|
"author": "Chris Breuer <chris@stacksjs.org>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"typecheck": "bun tsc --noEmit"
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
|
-
"@stacksjs/stx": "0.2.
|
|
78
|
-
"stx-router": "0.2.
|
|
77
|
+
"@stacksjs/stx": "0.2.849",
|
|
78
|
+
"stx-router": "0.2.849"
|
|
79
79
|
}
|
|
80
80
|
}
|