@absolutejs/absolute 0.19.0-beta.786 → 0.19.0-beta.789
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/angular/index.js +5 -5
- package/dist/angular/server.js +5 -5
- package/dist/build.js +6 -6
- package/dist/{chunk-4bq79t8v.js → chunk-0867j0r0.js} +3 -3
- package/dist/{chunk-xpkjbmd3.js → chunk-2j2cvn7e.js} +4 -4
- package/dist/{chunk-vvz7dcvq.js → chunk-3qswe70c.js} +244 -6
- package/dist/chunk-3qswe70c.js.map +15 -0
- package/dist/{chunk-xrmjy8kk.js → chunk-5f67rsed.js} +16 -4
- package/dist/chunk-5f67rsed.js.map +10 -0
- package/dist/{chunk-gq0zxpm0.js → chunk-7mtstdqn.js} +2 -2
- package/dist/{chunk-4m75s5xf.js → chunk-8cyvzcmc.js} +2 -2
- package/dist/{chunk-g3j22qf6.js → chunk-9939da67.js} +7 -7
- package/dist/{chunk-dr9yqsdb.js → chunk-9ve9jq72.js} +2 -2
- package/dist/{chunk-kndkjsya.js → chunk-d7mwkzry.js} +2 -2
- package/dist/{chunk-nhzf4az4.js → chunk-e3r9fxaa.js} +2 -2
- package/dist/{chunk-hep68ja7.js → chunk-rmc1aqky.js} +51 -145
- package/dist/{chunk-hep68ja7.js.map → chunk-rmc1aqky.js.map} +4 -5
- package/dist/{chunk-yfqhr31t.js → chunk-tjr0kcev.js} +6 -4
- package/dist/{chunk-yfqhr31t.js.map → chunk-tjr0kcev.js.map} +1 -1
- package/dist/{chunk-smgj0epn.js → chunk-txhm2vb5.js} +3 -3
- package/dist/{chunk-qk8kd3hr.js → chunk-v5vmsxmy.js} +3 -3
- package/dist/{chunk-qk8kd3hr.js.map → chunk-v5vmsxmy.js.map} +1 -1
- package/dist/{chunk-xzvy9hr4.js → chunk-x09cskqd.js} +2 -2
- package/dist/{chunk-6fkgm9s5.js → chunk-xnt8c6h2.js} +10 -3
- package/dist/{chunk-6fkgm9s5.js.map → chunk-xnt8c6h2.js.map} +3 -3
- package/dist/{chunk-9a307ca6.js → chunk-ynb0qx79.js} +2 -2
- package/dist/{chunk-3c7mpj3m.js → chunk-zrg9d4zw.js} +2 -2
- package/dist/index.js +62 -14
- package/dist/index.js.map +4 -3
- package/dist/islands/index.js +3 -3
- package/dist/react/index.js +5 -5
- package/dist/react/server.js +2 -2
- package/dist/src/build/stylePreprocessor.d.ts +1 -0
- package/dist/src/core/index.d.ts +2 -0
- package/dist/svelte/index.js +5 -5
- package/dist/svelte/server.js +4 -4
- package/dist/vue/index.js +5 -5
- package/dist/vue/server.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-vvz7dcvq.js.map +0 -13
- package/dist/chunk-xrmjy8kk.js.map +0 -10
- /package/dist/{chunk-4bq79t8v.js.map → chunk-0867j0r0.js.map} +0 -0
- /package/dist/{chunk-xpkjbmd3.js.map → chunk-2j2cvn7e.js.map} +0 -0
- /package/dist/{chunk-gq0zxpm0.js.map → chunk-7mtstdqn.js.map} +0 -0
- /package/dist/{chunk-4m75s5xf.js.map → chunk-8cyvzcmc.js.map} +0 -0
- /package/dist/{chunk-g3j22qf6.js.map → chunk-9939da67.js.map} +0 -0
- /package/dist/{chunk-dr9yqsdb.js.map → chunk-9ve9jq72.js.map} +0 -0
- /package/dist/{chunk-kndkjsya.js.map → chunk-d7mwkzry.js.map} +0 -0
- /package/dist/{chunk-nhzf4az4.js.map → chunk-e3r9fxaa.js.map} +0 -0
- /package/dist/{chunk-smgj0epn.js.map → chunk-txhm2vb5.js.map} +0 -0
- /package/dist/{chunk-xzvy9hr4.js.map → chunk-x09cskqd.js.map} +0 -0
- /package/dist/{chunk-9a307ca6.js.map → chunk-ynb0qx79.js.map} +0 -0
- /package/dist/{chunk-3c7mpj3m.js.map → chunk-zrg9d4zw.js.map} +0 -0
|
@@ -73,12 +73,13 @@ import {
|
|
|
73
73
|
loadIslandRegistryBuildInfo,
|
|
74
74
|
loadPageIslandMetadata,
|
|
75
75
|
logStartupTimingBlock,
|
|
76
|
-
setCurrentPageIslandMetadata
|
|
77
|
-
|
|
76
|
+
setCurrentPageIslandMetadata,
|
|
77
|
+
transformStaticPagesWithIslands
|
|
78
|
+
} from "./chunk-3qswe70c.js";
|
|
78
79
|
import {
|
|
79
80
|
disposeTailwindCompiler,
|
|
80
81
|
incrementalTailwindBuild
|
|
81
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-d7mwkzry.js";
|
|
82
83
|
import {
|
|
83
84
|
scanEntryPoints
|
|
84
85
|
} from "./chunk-11zpfqz6.js";
|
|
@@ -96,9 +97,6 @@ import {
|
|
|
96
97
|
import {
|
|
97
98
|
toPascal
|
|
98
99
|
} from "./chunk-p5504p14.js";
|
|
99
|
-
import {
|
|
100
|
-
renderIslandMarkup
|
|
101
|
-
} from "./chunk-4m75s5xf.js";
|
|
102
100
|
import {
|
|
103
101
|
createStylePreprocessorPlugin,
|
|
104
102
|
createStyleTransformConfig,
|
|
@@ -106,7 +104,7 @@ import {
|
|
|
106
104
|
getStyleBaseName,
|
|
107
105
|
isStyleModulePath,
|
|
108
106
|
isStylePath
|
|
109
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-xnt8c6h2.js";
|
|
110
108
|
import {
|
|
111
109
|
BUN_BUILD_WARNING_SUPPRESSION,
|
|
112
110
|
DEFAULT_DEBOUNCE_MS,
|
|
@@ -128,10 +126,10 @@ import {
|
|
|
128
126
|
cpSync,
|
|
129
127
|
existsSync as existsSync4,
|
|
130
128
|
mkdirSync,
|
|
131
|
-
readFileSync
|
|
129
|
+
readFileSync,
|
|
132
130
|
rmSync,
|
|
133
131
|
statSync,
|
|
134
|
-
writeFileSync
|
|
132
|
+
writeFileSync
|
|
135
133
|
} from "fs";
|
|
136
134
|
import { basename as basename2, dirname, join as join2, relative, resolve as resolve3 } from "path";
|
|
137
135
|
import { cwd, env, exit } from "process";
|
|
@@ -181,101 +179,6 @@ var createHTMLScriptHMRPlugin = (htmlDir, htmxDir) => ({
|
|
|
181
179
|
}
|
|
182
180
|
});
|
|
183
181
|
|
|
184
|
-
// src/build/staticIslandPages.ts
|
|
185
|
-
import { readFileSync, writeFileSync } from "fs";
|
|
186
|
-
var ISLAND_TAG_RE_SOURCE = "<(?:absolute-island|island)\\b([^>]*?)(?:\\/\\>|>(?:[\\s\\S]*?)<\\/(?:absolute-island|island)>)";
|
|
187
|
-
var ATTRIBUTE_RE_SOURCE = `([A-Za-z_:][-A-Za-z0-9_:.]*)\\s*=\\s*(?:"([^"]*)"|'([^']*)')`;
|
|
188
|
-
var islandFrameworks = [
|
|
189
|
-
"react",
|
|
190
|
-
"svelte",
|
|
191
|
-
"vue",
|
|
192
|
-
"angular"
|
|
193
|
-
];
|
|
194
|
-
var islandHydrationModes = ["load", "idle", "visible", "none"];
|
|
195
|
-
var isRecord = (value) => typeof value === "object" && value !== null;
|
|
196
|
-
var isIslandFramework = (value) => islandFrameworks.some((framework) => framework === value);
|
|
197
|
-
var isIslandHydrationMode = (value) => islandHydrationModes.some((mode) => mode === value);
|
|
198
|
-
var parseHtmlAttributes = (attributeString) => {
|
|
199
|
-
const attributeRe = new RegExp(ATTRIBUTE_RE_SOURCE, "g");
|
|
200
|
-
const attributes = new Map;
|
|
201
|
-
let match = attributeRe.exec(attributeString);
|
|
202
|
-
while (match) {
|
|
203
|
-
const [, key, doubleQuotedValue, singleQuotedValue] = match;
|
|
204
|
-
match = attributeRe.exec(attributeString);
|
|
205
|
-
if (!key)
|
|
206
|
-
continue;
|
|
207
|
-
const value = doubleQuotedValue ?? singleQuotedValue ?? "";
|
|
208
|
-
attributes.set(key, value);
|
|
209
|
-
}
|
|
210
|
-
return attributes;
|
|
211
|
-
};
|
|
212
|
-
var parseIslandTag = (attributeString) => {
|
|
213
|
-
const attributes = parseHtmlAttributes(attributeString);
|
|
214
|
-
const framework = attributes.get("framework");
|
|
215
|
-
const component = attributes.get("component");
|
|
216
|
-
const hydrate = attributes.get("hydrate") ?? "load";
|
|
217
|
-
const propsSource = attributes.get("props") ?? "{}";
|
|
218
|
-
if (!framework || !component) {
|
|
219
|
-
return null;
|
|
220
|
-
}
|
|
221
|
-
if (!isIslandFramework(framework)) {
|
|
222
|
-
throw new Error(`Unsupported static island framework "${framework}".`);
|
|
223
|
-
}
|
|
224
|
-
if (!isIslandHydrationMode(hydrate)) {
|
|
225
|
-
throw new Error(`Unsupported static island hydrate mode "${hydrate}".`);
|
|
226
|
-
}
|
|
227
|
-
let parsedProps;
|
|
228
|
-
try {
|
|
229
|
-
const candidate = JSON.parse(propsSource);
|
|
230
|
-
parsedProps = isRecord(candidate) ? candidate : {};
|
|
231
|
-
} catch (error) {
|
|
232
|
-
throw new Error(`Failed to parse static island props JSON for ${framework}:${component}: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
|
|
233
|
-
}
|
|
234
|
-
return {
|
|
235
|
-
component,
|
|
236
|
-
framework,
|
|
237
|
-
hydrate,
|
|
238
|
-
props: parsedProps
|
|
239
|
-
};
|
|
240
|
-
};
|
|
241
|
-
var transformStaticPageHtml = async (originalHtml, registry) => {
|
|
242
|
-
const islandTagRe = new RegExp(ISLAND_TAG_RE_SOURCE, "gi");
|
|
243
|
-
if (!islandTagRe.test(originalHtml)) {
|
|
244
|
-
return originalHtml;
|
|
245
|
-
}
|
|
246
|
-
islandTagRe.lastIndex = 0;
|
|
247
|
-
const segments = [];
|
|
248
|
-
let lastIndex = 0;
|
|
249
|
-
let match = islandTagRe.exec(originalHtml);
|
|
250
|
-
while (match) {
|
|
251
|
-
const [fullMatch, rawAttributeString] = match;
|
|
252
|
-
const attributeString = rawAttributeString ?? "";
|
|
253
|
-
segments.push({
|
|
254
|
-
before: originalHtml.slice(lastIndex, match.index),
|
|
255
|
-
fullMatch,
|
|
256
|
-
props: parseIslandTag(attributeString)
|
|
257
|
-
});
|
|
258
|
-
lastIndex = match.index + fullMatch.length;
|
|
259
|
-
match = islandTagRe.exec(originalHtml);
|
|
260
|
-
}
|
|
261
|
-
const renderedSegments = await Promise.all(segments.map(async (segment) => segment.before + (segment.props ? await renderIslandMarkup(registry, segment.props) : segment.fullMatch)));
|
|
262
|
-
return renderedSegments.join("") + originalHtml.slice(lastIndex);
|
|
263
|
-
};
|
|
264
|
-
var transformStaticPage = async (pagePath, registry) => {
|
|
265
|
-
const originalHtml = readFileSync(pagePath, "utf-8");
|
|
266
|
-
const transformedHtml = await transformStaticPageHtml(originalHtml, registry);
|
|
267
|
-
if (transformedHtml !== originalHtml) {
|
|
268
|
-
writeFileSync(pagePath, transformedHtml);
|
|
269
|
-
}
|
|
270
|
-
};
|
|
271
|
-
var transformStaticPagesWithIslands = async (registryPath, pagePaths) => {
|
|
272
|
-
if (!registryPath || pagePaths.length === 0) {
|
|
273
|
-
return;
|
|
274
|
-
}
|
|
275
|
-
const { registry } = await loadIslandRegistryBuildInfo(registryPath);
|
|
276
|
-
await Promise.all(pagePaths.map((pagePath) => transformStaticPage(pagePath, registry)));
|
|
277
|
-
};
|
|
278
|
-
|
|
279
182
|
// src/build/outputLogs.ts
|
|
280
183
|
var outputLogs = (logs) => {
|
|
281
184
|
for (const log of logs) {
|
|
@@ -580,7 +483,7 @@ var collectWorkerPathsFromContent = (content, pattern, file, workerPaths) => {
|
|
|
580
483
|
}
|
|
581
484
|
};
|
|
582
485
|
var collectWorkerPathsFromFile = (file, patterns, workerPaths) => {
|
|
583
|
-
const content =
|
|
486
|
+
const content = readFileSync(file, "utf-8");
|
|
584
487
|
for (const pattern of patterns) {
|
|
585
488
|
collectWorkerPathsFromContent(content, pattern, file, workerPaths);
|
|
586
489
|
}
|
|
@@ -633,9 +536,9 @@ var copyReactDevIndexes = (reactIndexesPath, reactPagesPath, devIndexDir, readDi
|
|
|
633
536
|
const indexFiles = readDir(reactIndexesPath).filter((file) => file.endsWith(".tsx"));
|
|
634
537
|
const pagesRel = relative(process.cwd(), resolve3(reactPagesPath)).replace(/\\/g, "/");
|
|
635
538
|
for (const file of indexFiles) {
|
|
636
|
-
let content =
|
|
539
|
+
let content = readFileSync(join2(reactIndexesPath, file), "utf-8");
|
|
637
540
|
content = content.replace(/from\s*['"]([^'"]*\/pages\/([^'"]+))['"]/g, (_match, _fullPath, componentName) => `from '/@src/${pagesRel}/${componentName}'`);
|
|
638
|
-
|
|
541
|
+
writeFileSync(join2(devIndexDir, file), content);
|
|
639
542
|
}
|
|
640
543
|
};
|
|
641
544
|
var copySvelteDevIndexes = (svelteDir, sveltePagesPath, svelteEntries, devIndexDir) => {
|
|
@@ -646,10 +549,10 @@ var copySvelteDevIndexes = (svelteDir, sveltePagesPath, svelteEntries, devIndexD
|
|
|
646
549
|
const indexFile = join2(svelteIndexDir, "pages", `${name}.js`);
|
|
647
550
|
if (!existsSync4(indexFile))
|
|
648
551
|
continue;
|
|
649
|
-
let content =
|
|
552
|
+
let content = readFileSync(indexFile, "utf-8");
|
|
650
553
|
const srcRel = relative(process.cwd(), resolve3(entry)).replace(/\\/g, "/");
|
|
651
554
|
content = content.replace(/import\s+Component\s+from\s+['"]([^'"]+)['"]/, `import Component from "/@src/${srcRel}"`);
|
|
652
|
-
|
|
555
|
+
writeFileSync(join2(devIndexDir, `${name}.svelte.js`), content);
|
|
653
556
|
}
|
|
654
557
|
};
|
|
655
558
|
var copyVueDevIndexes = (vueDir, vuePagesPath, vueEntries, devIndexDir) => {
|
|
@@ -660,10 +563,10 @@ var copyVueDevIndexes = (vueDir, vuePagesPath, vueEntries, devIndexDir) => {
|
|
|
660
563
|
const indexFile = join2(vueIndexDir, `${name}.js`);
|
|
661
564
|
if (!existsSync4(indexFile))
|
|
662
565
|
continue;
|
|
663
|
-
let content =
|
|
566
|
+
let content = readFileSync(indexFile, "utf-8");
|
|
664
567
|
const srcRel = relative(process.cwd(), resolve3(entry)).replace(/\\/g, "/");
|
|
665
568
|
content = content.replace(/import\s+Comp\s+from\s+['"]([^'"]+)['"]/, `import Comp from "/@src/${srcRel}"`);
|
|
666
|
-
|
|
569
|
+
writeFileSync(join2(devIndexDir, `${name}.vue.js`), content);
|
|
667
570
|
}
|
|
668
571
|
};
|
|
669
572
|
var resolveVueRuntimeId = (content, firstUseName, outputPath, projectRoot) => {
|
|
@@ -737,7 +640,7 @@ var VUE_HMR_RUNTIME = [
|
|
|
737
640
|
`}}return r;};}`
|
|
738
641
|
].join("");
|
|
739
642
|
var injectVueComposableTracking = (outputPath, projectRoot) => {
|
|
740
|
-
let content =
|
|
643
|
+
let content = readFileSync(outputPath, "utf-8");
|
|
741
644
|
const usePattern = /^var\s+(use[A-Z]\w*)\s*=/gm;
|
|
742
645
|
const useNames = [];
|
|
743
646
|
let match;
|
|
@@ -758,7 +661,7 @@ var injectVueComposableTracking = (outputPath, projectRoot) => {
|
|
|
758
661
|
content = `${content.slice(0, firstUseIdx) + runtime}
|
|
759
662
|
${content.slice(firstUseIdx)}`;
|
|
760
663
|
content = wrapUseFunctions(content, useNames);
|
|
761
|
-
|
|
664
|
+
writeFileSync(outputPath, content);
|
|
762
665
|
};
|
|
763
666
|
var buildDevUrlFileMap = (urlReferencedFiles, projectRoot) => {
|
|
764
667
|
const urlFileMap = new Map;
|
|
@@ -791,7 +694,7 @@ var buildUrlFileMap = (urlReferencedFiles, hmr, projectRoot, buildPath, nonReact
|
|
|
791
694
|
var rewriteUrlReferences = (outputPaths, urlFileMap) => {
|
|
792
695
|
const urlPattern = /new\s+URL\(\s*["'](\.\.?\/[^"']+)["']\s*,\s*import\.meta\.url\s*\)/g;
|
|
793
696
|
for (const outputPath of outputPaths) {
|
|
794
|
-
let content =
|
|
697
|
+
let content = readFileSync(outputPath, "utf-8");
|
|
795
698
|
let changed = false;
|
|
796
699
|
content = content.replace(urlPattern, (_match, relPath) => {
|
|
797
700
|
const targetName = basename2(relPath);
|
|
@@ -802,7 +705,7 @@ var rewriteUrlReferences = (outputPaths, urlFileMap) => {
|
|
|
802
705
|
return `new URL('${resolvedPath}', import.meta.url)`;
|
|
803
706
|
});
|
|
804
707
|
if (changed)
|
|
805
|
-
|
|
708
|
+
writeFileSync(outputPath, content);
|
|
806
709
|
}
|
|
807
710
|
};
|
|
808
711
|
var vueFeatureFlags = {
|
|
@@ -944,7 +847,7 @@ var build = async ({
|
|
|
944
847
|
const traceDir = join2(buildPath2, ".absolute-trace");
|
|
945
848
|
const timestamp = new Date().toISOString().replace(/[:.]/g, "-");
|
|
946
849
|
mkdirSync(traceDir, { recursive: true });
|
|
947
|
-
|
|
850
|
+
writeFileSync(join2(traceDir, `build-trace-${timestamp}.json`), JSON.stringify({
|
|
948
851
|
events: traceEvents,
|
|
949
852
|
frameworks: traceFrameworkNames,
|
|
950
853
|
generatedAt: new Date().toISOString(),
|
|
@@ -1151,28 +1054,28 @@ var build = async ({
|
|
|
1151
1054
|
{ vueClientPaths: islandVueClientPaths },
|
|
1152
1055
|
{ clientPaths: islandAngularClientPaths }
|
|
1153
1056
|
] = await Promise.all([
|
|
1154
|
-
shouldCompileSvelte ? tracePhase("compile/svelte", () => import("./chunk-
|
|
1057
|
+
shouldCompileSvelte ? tracePhase("compile/svelte", () => import("./chunk-x09cskqd.js").then((mod) => mod.compileSvelte(svelteEntries, svelteDir, new Map, hmr, styleTransformConfig))) : {
|
|
1155
1058
|
svelteClientPaths: [...emptyStringArray],
|
|
1156
1059
|
svelteIndexPaths: [...emptyStringArray],
|
|
1157
1060
|
svelteServerPaths: [...emptyStringArray]
|
|
1158
1061
|
},
|
|
1159
|
-
shouldCompileVue ? tracePhase("compile/vue", () => import("./chunk-
|
|
1062
|
+
shouldCompileVue ? tracePhase("compile/vue", () => import("./chunk-5f67rsed.js").then((mod) => mod.compileVue(vueEntries, vueDir, hmr, styleTransformConfig))) : {
|
|
1160
1063
|
vueClientPaths: [...emptyStringArray],
|
|
1161
1064
|
vueCssPaths: [...emptyStringArray],
|
|
1162
1065
|
vueIndexPaths: [...emptyStringArray],
|
|
1163
1066
|
vueServerPaths: [...emptyStringArray]
|
|
1164
1067
|
},
|
|
1165
|
-
shouldCompileAngular ? tracePhase("compile/angular", () => import("./chunk-
|
|
1068
|
+
shouldCompileAngular ? tracePhase("compile/angular", () => import("./chunk-ynb0qx79.js").then((mod) => mod.compileAngular(angularEntries, angularDir, hmr, styleTransformConfig))) : {
|
|
1166
1069
|
clientPaths: [...emptyStringArray],
|
|
1167
1070
|
serverPaths: [...emptyStringArray]
|
|
1168
1071
|
},
|
|
1169
|
-
shouldCompileIslandSvelte ? tracePhase("compile/island-svelte", () => import("./chunk-
|
|
1072
|
+
shouldCompileIslandSvelte ? tracePhase("compile/island-svelte", () => import("./chunk-x09cskqd.js").then((mod) => mod.compileSvelte(islandSvelteSources, svelteDir, new Map, hmr, styleTransformConfig))) : {
|
|
1170
1073
|
svelteClientPaths: [...emptyStringArray]
|
|
1171
1074
|
},
|
|
1172
|
-
shouldCompileIslandVue ? tracePhase("compile/island-vue", () => import("./chunk-
|
|
1075
|
+
shouldCompileIslandVue ? tracePhase("compile/island-vue", () => import("./chunk-5f67rsed.js").then((mod) => mod.compileVue(islandVueSources, vueDir, hmr, styleTransformConfig))) : {
|
|
1173
1076
|
vueClientPaths: [...emptyStringArray]
|
|
1174
1077
|
},
|
|
1175
|
-
shouldCompileIslandAngular ? tracePhase("compile/island-angular", () => import("./chunk-
|
|
1078
|
+
shouldCompileIslandAngular ? tracePhase("compile/island-angular", () => import("./chunk-ynb0qx79.js").then((mod) => mod.compileAngular(islandAngularSources, angularDir, hmr, styleTransformConfig))) : {
|
|
1176
1079
|
clientPaths: [...emptyStringArray]
|
|
1177
1080
|
}
|
|
1178
1081
|
]);
|
|
@@ -1248,9 +1151,9 @@ var build = async ({
|
|
|
1248
1151
|
angularConvResult
|
|
1249
1152
|
] = await Promise.all([
|
|
1250
1153
|
tracePhase("compile/convention-react", compileReactConventions),
|
|
1251
|
-
svelteConventionSources.length > 0 && svelteDir ? tracePhase("compile/convention-svelte", () => import("./chunk-
|
|
1252
|
-
vueConventionSources.length > 0 && vueDir ? tracePhase("compile/convention-vue", () => import("./chunk-
|
|
1253
|
-
angularConventionSources.length > 0 && angularDir ? tracePhase("compile/convention-angular", () => import("./chunk-
|
|
1154
|
+
svelteConventionSources.length > 0 && svelteDir ? tracePhase("compile/convention-svelte", () => import("./chunk-x09cskqd.js").then((mod) => mod.compileSvelte(svelteConventionSources, svelteDir, new Map, false, styleTransformConfig))) : { svelteServerPaths: emptyStringArray },
|
|
1155
|
+
vueConventionSources.length > 0 && vueDir ? tracePhase("compile/convention-vue", () => import("./chunk-5f67rsed.js").then((mod) => mod.compileVue(vueConventionSources, vueDir, false, styleTransformConfig))) : { vueServerPaths: emptyStringArray },
|
|
1156
|
+
angularConventionSources.length > 0 && angularDir ? tracePhase("compile/convention-angular", () => import("./chunk-ynb0qx79.js").then((mod) => mod.compileAngular(angularConventionSources, angularDir, hmr, styleTransformConfig))) : { serverPaths: emptyStringArray }
|
|
1254
1157
|
]);
|
|
1255
1158
|
const bundleConventionFiles = async (framework, compiledPaths) => {
|
|
1256
1159
|
const destDir = join2(buildPath, "conventions", framework);
|
|
@@ -1463,7 +1366,10 @@ var build = async ({
|
|
|
1463
1366
|
format: "esm",
|
|
1464
1367
|
naming: `[dir]/[name].[hash].[ext]`,
|
|
1465
1368
|
outdir: serverOutDir,
|
|
1466
|
-
plugins: [
|
|
1369
|
+
plugins: [
|
|
1370
|
+
stylePreprocessorPlugin,
|
|
1371
|
+
...angularDir ? [createAngularLinkerPlugin(hmr)] : []
|
|
1372
|
+
],
|
|
1467
1373
|
root: serverRoot,
|
|
1468
1374
|
target: "bun",
|
|
1469
1375
|
throw: false,
|
|
@@ -1641,13 +1547,13 @@ var build = async ({
|
|
|
1641
1547
|
const injectHMRIntoHTMLFile = (filePath, framework) => {
|
|
1642
1548
|
if (!hmrClientBundle)
|
|
1643
1549
|
return;
|
|
1644
|
-
let html =
|
|
1550
|
+
let html = readFileSync(filePath, "utf-8");
|
|
1645
1551
|
if (html.includes("data-hmr-client"))
|
|
1646
1552
|
return;
|
|
1647
1553
|
const tag = `<script>window.__HMR_FRAMEWORK__="${framework}";</script><script data-hmr-client>${hmrClientBundle}</script>`;
|
|
1648
1554
|
const bodyClose = /<\/body\s*>/i.exec(html);
|
|
1649
1555
|
html = bodyClose ? html.slice(0, bodyClose.index) + tag + html.slice(bodyClose.index) : html + tag;
|
|
1650
|
-
|
|
1556
|
+
writeFileSync(filePath, html);
|
|
1651
1557
|
};
|
|
1652
1558
|
const processHtmlPages = async () => {
|
|
1653
1559
|
if (!(htmlDir && htmlPagesPath))
|
|
@@ -1742,9 +1648,9 @@ var build = async ({
|
|
|
1742
1648
|
writeBuildTrace(buildPath);
|
|
1743
1649
|
return { conventions: conventionsMap, manifest };
|
|
1744
1650
|
}
|
|
1745
|
-
|
|
1651
|
+
writeFileSync(join2(buildPath, "manifest.json"), JSON.stringify(manifest, null, "\t"));
|
|
1746
1652
|
if (Object.keys(conventionsMap).length > 0) {
|
|
1747
|
-
|
|
1653
|
+
writeFileSync(join2(buildPath, "conventions.json"), JSON.stringify(conventionsMap, null, "\t"));
|
|
1748
1654
|
}
|
|
1749
1655
|
writeBuildTrace(buildPath);
|
|
1750
1656
|
if (tailwind && mode === "production") {
|
|
@@ -1754,7 +1660,7 @@ var build = async ({
|
|
|
1754
1660
|
};
|
|
1755
1661
|
|
|
1756
1662
|
// src/dev/dependencyGraph.ts
|
|
1757
|
-
import { existsSync as existsSync5, readFileSync as
|
|
1663
|
+
import { existsSync as existsSync5, readFileSync as readFileSync2 } from "fs";
|
|
1758
1664
|
var {Glob: Glob5 } = globalThis.Bun;
|
|
1759
1665
|
import { resolve as resolve4 } from "path";
|
|
1760
1666
|
var emptyDependencyGraph = {
|
|
@@ -1944,15 +1850,15 @@ var extractDependenciesForFile = (filePath) => {
|
|
|
1944
1850
|
const lowerPath = filePath.toLowerCase();
|
|
1945
1851
|
const isSvelteOrVue = lowerPath.endsWith(".svelte") || lowerPath.endsWith(".vue");
|
|
1946
1852
|
if (loader === "html") {
|
|
1947
|
-
const content =
|
|
1853
|
+
const content = readFileSync2(filePath, "utf-8");
|
|
1948
1854
|
return extractHtmlDependencies(filePath, content);
|
|
1949
1855
|
}
|
|
1950
1856
|
if (loader === "tsx" || loader === "js") {
|
|
1951
|
-
const content =
|
|
1857
|
+
const content = readFileSync2(filePath, "utf-8");
|
|
1952
1858
|
return extractJsDependencies(filePath, content, loader);
|
|
1953
1859
|
}
|
|
1954
1860
|
if (isSvelteOrVue) {
|
|
1955
|
-
const content =
|
|
1861
|
+
const content = readFileSync2(filePath, "utf-8");
|
|
1956
1862
|
return extractSvelteVueDependencies(filePath, content);
|
|
1957
1863
|
}
|
|
1958
1864
|
return [];
|
|
@@ -2283,10 +2189,10 @@ import { existsSync as existsSync7 } from "fs";
|
|
|
2283
2189
|
import { basename as basename4, dirname as dirname2, relative as relative2, resolve as resolve9 } from "path";
|
|
2284
2190
|
|
|
2285
2191
|
// src/dev/fileHashTracker.ts
|
|
2286
|
-
import { readFileSync as
|
|
2192
|
+
import { readFileSync as readFileSync3 } from "fs";
|
|
2287
2193
|
var computeFileHash = (filePath) => {
|
|
2288
2194
|
try {
|
|
2289
|
-
const fileContent =
|
|
2195
|
+
const fileContent = readFileSync3(filePath);
|
|
2290
2196
|
return Number(Bun.hash(fileContent));
|
|
2291
2197
|
} catch {
|
|
2292
2198
|
return UNFOUND_INDEX;
|
|
@@ -2418,7 +2324,7 @@ var mapSourceFileToManifestKeys = (sourceFile, framework, resolvedPaths) => {
|
|
|
2418
2324
|
};
|
|
2419
2325
|
|
|
2420
2326
|
// src/dev/rebuildTrigger.ts
|
|
2421
|
-
var moduleServerPromise = import("./chunk-
|
|
2327
|
+
var moduleServerPromise = import("./chunk-zrg9d4zw.js");
|
|
2422
2328
|
var getModuleServer = () => moduleServerPromise;
|
|
2423
2329
|
var runSequentially = (items, action) => items.reduce((chain, item) => chain.then(() => action(item)), Promise.resolve());
|
|
2424
2330
|
var getStyleTransformConfig = (config) => createStyleTransformConfig(config.stylePreprocessors, config.postcss);
|
|
@@ -2847,7 +2753,7 @@ var broadcastAngularPageUpdates = (state, pagesToUpdate, manifest, startTime) =>
|
|
|
2847
2753
|
});
|
|
2848
2754
|
};
|
|
2849
2755
|
var compileAndBundleAngular = async (state, pageEntries, angularDir) => {
|
|
2850
|
-
const { compileAngular } = await import("./chunk-
|
|
2756
|
+
const { compileAngular } = await import("./chunk-ynb0qx79.js");
|
|
2851
2757
|
const { clientPaths, serverPaths } = await compileAngular(pageEntries, angularDir, true, getStyleTransformConfig(state.config));
|
|
2852
2758
|
serverPaths.forEach((serverPath) => {
|
|
2853
2759
|
const fileBase = basename4(serverPath, ".js");
|
|
@@ -2978,7 +2884,7 @@ var bundleReactClient = async (state, reactEntries, reactIndexesPath, buildDir)
|
|
|
2978
2884
|
await populateAssetStore(state.assetStore, clientManifest, buildDir);
|
|
2979
2885
|
};
|
|
2980
2886
|
var getModuleUrl = async (pageFile) => {
|
|
2981
|
-
const { invalidateModule, warmCache, SRC_URL_PREFIX } = await import("./chunk-
|
|
2887
|
+
const { invalidateModule, warmCache, SRC_URL_PREFIX } = await import("./chunk-zrg9d4zw.js");
|
|
2982
2888
|
invalidateModule(pageFile);
|
|
2983
2889
|
const rel = relative2(process.cwd(), pageFile).replace(/\\/g, "/");
|
|
2984
2890
|
const url = `${SRC_URL_PREFIX}${rel}`;
|
|
@@ -3126,7 +3032,7 @@ var handleSvelteFastPath = async (state, config, filesToRebuild, startTime, onRe
|
|
|
3126
3032
|
}
|
|
3127
3033
|
const { buildDir } = state.resolvedPaths;
|
|
3128
3034
|
if (svelteFiles.length > 0) {
|
|
3129
|
-
const { compileSvelte } = await import("./chunk-
|
|
3035
|
+
const { compileSvelte } = await import("./chunk-x09cskqd.js");
|
|
3130
3036
|
const { build: bunBuild3 } = await Promise.resolve(globalThis.Bun);
|
|
3131
3037
|
const clientRoot = await computeClientRoot(state.resolvedPaths);
|
|
3132
3038
|
const { svelteServerPaths, svelteIndexPaths, svelteClientPaths } = await compileSvelte(svelteFiles, svelteDir, new Map, true, getStyleTransformConfig(state.config));
|
|
@@ -3506,7 +3412,7 @@ var broadcastVuePageChange = async (state, config, vuePagePath, manifest, durati
|
|
|
3506
3412
|
const hmrId = vueRoot ? relative2(vueRoot, vuePagePath).replace(/\\/g, "/").replace(/\.vue$/, "") : baseName;
|
|
3507
3413
|
const cssKey = `${pascalName}CSS`;
|
|
3508
3414
|
const cssUrl = manifest[cssKey] || null;
|
|
3509
|
-
const { vueHmrMetadata } = await import("./chunk-
|
|
3415
|
+
const { vueHmrMetadata } = await import("./chunk-5f67rsed.js");
|
|
3510
3416
|
const hmrMeta = vueHmrMetadata.get(resolve9(vuePagePath));
|
|
3511
3417
|
const changeType = hmrMeta?.changeType ?? "full";
|
|
3512
3418
|
if (changeType === "style-only") {
|
|
@@ -4405,7 +4311,7 @@ var devBuild = async (config) => {
|
|
|
4405
4311
|
}
|
|
4406
4312
|
recordStep("load vendor files", stepStartedAt);
|
|
4407
4313
|
stepStartedAt = performance.now();
|
|
4408
|
-
const { warmCompilers } = await import("./chunk-
|
|
4314
|
+
const { warmCompilers } = await import("./chunk-zrg9d4zw.js");
|
|
4409
4315
|
await warmCompilers({
|
|
4410
4316
|
svelte: Boolean(config.svelteDirectory),
|
|
4411
4317
|
vue: Boolean(config.vueDirectory)
|
|
@@ -4413,7 +4319,7 @@ var devBuild = async (config) => {
|
|
|
4413
4319
|
recordStep("warm compilers", stepStartedAt);
|
|
4414
4320
|
if (config.tailwind) {
|
|
4415
4321
|
stepStartedAt = performance.now();
|
|
4416
|
-
const { warmTailwindCompiler } = await import("./chunk-
|
|
4322
|
+
const { warmTailwindCompiler } = await import("./chunk-txhm2vb5.js");
|
|
4417
4323
|
await warmTailwindCompiler(config.tailwind);
|
|
4418
4324
|
recordStep("warm tailwind compiler", stepStartedAt);
|
|
4419
4325
|
}
|
|
@@ -4440,5 +4346,5 @@ var devBuild = async (config) => {
|
|
|
4440
4346
|
|
|
4441
4347
|
export { build, devBuild };
|
|
4442
4348
|
|
|
4443
|
-
//# debugId=
|
|
4444
|
-
//# sourceMappingURL=chunk-
|
|
4349
|
+
//# debugId=EC404FA446B0D84F64756E2164756E21
|
|
4350
|
+
//# sourceMappingURL=chunk-rmc1aqky.js.map
|