@vertz/ui-server 0.2.37 → 0.2.38
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/bun-plugin/index.js +15 -1
- package/dist/index.js +3 -3
- package/dist/node-handler.js +2 -2
- package/dist/shared/{chunk-vcpk8fs6.js → chunk-2ymwre0k.js} +7 -1
- package/dist/shared/{chunk-rwa95knv.js → chunk-595trxsn.js} +1 -1
- package/dist/shared/{chunk-4qb2xcyb.js → chunk-d1a3ygv6.js} +1 -1
- package/dist/ssr/index.js +2 -2
- package/package.json +1 -1
package/dist/bun-plugin/index.js
CHANGED
|
@@ -1159,6 +1159,7 @@ function createVertzBunPlugin(options) {
|
|
|
1159
1159
|
if (imageQueue.length > 0) {
|
|
1160
1160
|
await Promise.all(imageQueue.map((opts) => processImage({ ...opts, fit: opts.fit })));
|
|
1161
1161
|
}
|
|
1162
|
+
let nativeCss;
|
|
1162
1163
|
const compileResult = nativeCompiler ? (() => {
|
|
1163
1164
|
if (!nativeManifestWarningLogged && manifests.size > 0) {
|
|
1164
1165
|
nativeManifestWarningLogged = true;
|
|
@@ -1172,6 +1173,9 @@ function createVertzBunPlugin(options) {
|
|
|
1172
1173
|
target: options?.target,
|
|
1173
1174
|
fastRefresh: false
|
|
1174
1175
|
});
|
|
1176
|
+
if (nativeResult.css) {
|
|
1177
|
+
nativeCss = nativeResult.css;
|
|
1178
|
+
}
|
|
1175
1179
|
return {
|
|
1176
1180
|
code: nativeResult.code,
|
|
1177
1181
|
map: nativeResult.map ? JSON.parse(nativeResult.map) : { version: 3, sources: [], mappings: "", names: [] },
|
|
@@ -1197,8 +1201,15 @@ function createVertzBunPlugin(options) {
|
|
|
1197
1201
|
mapsToChain.push(routeSplitMap);
|
|
1198
1202
|
}
|
|
1199
1203
|
const remapped = remapping(mapsToChain, () => null);
|
|
1200
|
-
const extraction = cssExtractor.extract(source, args.path);
|
|
1204
|
+
const extraction = nativeCss ? { css: nativeCss, blockNames: [] } : cssExtractor.extract(source, args.path);
|
|
1201
1205
|
let cssImportLine = "";
|
|
1206
|
+
let nativeCssInjection = "";
|
|
1207
|
+
if (nativeCss && extraction.css.length > 0) {
|
|
1208
|
+
const escaped = extraction.css.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$/g, "\\$");
|
|
1209
|
+
nativeCssInjection = `import { injectCSS as __injectCSS } from '@vertz/ui';
|
|
1210
|
+
__injectCSS(\`${escaped}\`);
|
|
1211
|
+
`;
|
|
1212
|
+
}
|
|
1202
1213
|
if (extraction.css.length > 0) {
|
|
1203
1214
|
fileExtractions.set(args.path, extraction);
|
|
1204
1215
|
if (hmr) {
|
|
@@ -1224,6 +1235,9 @@ function createVertzBunPlugin(options) {
|
|
|
1224
1235
|
}
|
|
1225
1236
|
}
|
|
1226
1237
|
let contents = "";
|
|
1238
|
+
if (nativeCssInjection) {
|
|
1239
|
+
contents += nativeCssInjection;
|
|
1240
|
+
}
|
|
1227
1241
|
if (cssImportLine) {
|
|
1228
1242
|
contents += cssImportLine;
|
|
1229
1243
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createSSRHandler,
|
|
3
3
|
loadAotManifest
|
|
4
|
-
} from "./shared/chunk-
|
|
4
|
+
} from "./shared/chunk-595trxsn.js";
|
|
5
5
|
import {
|
|
6
6
|
createNodeHandler
|
|
7
|
-
} from "./shared/chunk-
|
|
7
|
+
} from "./shared/chunk-d1a3ygv6.js";
|
|
8
8
|
import {
|
|
9
9
|
collectStreamChunks,
|
|
10
10
|
compileThemeCached,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
ssrRenderToString,
|
|
35
35
|
streamToString,
|
|
36
36
|
toPrefetchSession
|
|
37
|
-
} from "./shared/chunk-
|
|
37
|
+
} from "./shared/chunk-2ymwre0k.js";
|
|
38
38
|
import {
|
|
39
39
|
clearGlobalSSRTimeout,
|
|
40
40
|
createSSRAdapter,
|
package/dist/node-handler.js
CHANGED
|
@@ -1120,7 +1120,13 @@ async function ssrRenderAot(module, url, options) {
|
|
|
1120
1120
|
for (const [key, value] of queryCache) {
|
|
1121
1121
|
data[key] = value;
|
|
1122
1122
|
}
|
|
1123
|
-
|
|
1123
|
+
let html;
|
|
1124
|
+
try {
|
|
1125
|
+
html = aotEntry.render(data, ctx);
|
|
1126
|
+
} catch (renderErr) {
|
|
1127
|
+
console.error("[SSR] AOT render failed for", match.pattern, "— falling back to single-pass:", renderErr instanceof Error ? renderErr.message : renderErr);
|
|
1128
|
+
return ssrRenderSinglePass(module, normalizedUrl, fallbackOptions);
|
|
1129
|
+
}
|
|
1124
1130
|
if (options.diagnostics && isAotDebugEnabled()) {
|
|
1125
1131
|
try {
|
|
1126
1132
|
const domResult = await ssrRenderSinglePass(module, normalizedUrl, fallbackOptions);
|
package/dist/ssr/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createSSRHandler,
|
|
3
3
|
loadAotManifest
|
|
4
|
-
} from "../shared/chunk-
|
|
4
|
+
} from "../shared/chunk-595trxsn.js";
|
|
5
5
|
import {
|
|
6
6
|
injectIntoTemplate,
|
|
7
7
|
ssrDiscoverQueries,
|
|
8
8
|
ssrRenderToString
|
|
9
|
-
} from "../shared/chunk-
|
|
9
|
+
} from "../shared/chunk-2ymwre0k.js";
|
|
10
10
|
import"../shared/chunk-ybftdw1r.js";
|
|
11
11
|
// src/prerender.ts
|
|
12
12
|
async function discoverRoutes(module) {
|