bosia 1.2.1 → 1.2.3
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/package.json +1 -1
- package/src/core/build.ts +10 -2
- package/src/core/client/App.svelte +365 -250
- package/src/core/client/enhance.ts +6 -2
- package/src/core/client/hydrate.ts +7 -2
- package/src/core/client/navigation.ts +46 -27
- package/src/core/client/router.svelte.ts +24 -5
- package/src/core/headScan.ts +6 -0
- package/src/core/matcher.ts +52 -85
- package/src/core/prerender.ts +134 -35
- package/src/core/renderer.ts +2 -2
- package/src/core/routeFile.ts +21 -17
- package/src/core/routeTypes.ts +14 -11
- package/src/core/scanner.ts +76 -13
- package/templates/demo/src/routes/(public)/blog/[slug]/+page.server.ts +1 -1
package/package.json
CHANGED
package/src/core/build.ts
CHANGED
|
@@ -18,7 +18,7 @@ import { makeBosiaPlugin } from "./plugin.ts";
|
|
|
18
18
|
import { makeBosiaSvelteCompiler, svelteMapCache } from "./svelteCompiler.ts";
|
|
19
19
|
import { finalizeComponentCss } from "./componentCss.ts";
|
|
20
20
|
import { buildPreloadMap } from "./preloadMap.ts";
|
|
21
|
-
import { prerenderStaticRoutes, generateStaticSite } from "./prerender.ts";
|
|
21
|
+
import { prerenderStaticRoutes, generateStaticSite, PrerenderEntriesError } from "./prerender.ts";
|
|
22
22
|
import { precompressDir } from "./precompress.ts";
|
|
23
23
|
import { loadEnv, classifyEnvVars } from "./env.ts";
|
|
24
24
|
import { generateEnvModules } from "./envCodegen.ts";
|
|
@@ -400,7 +400,15 @@ await bundleRuntimeUserFiles(process.cwd());
|
|
|
400
400
|
const devBuild = process.env.BOSIA_DEV_BUILD === "1";
|
|
401
401
|
|
|
402
402
|
// 9. Prerender static routes
|
|
403
|
-
if (!devBuild)
|
|
403
|
+
if (!devBuild) {
|
|
404
|
+
try {
|
|
405
|
+
await prerenderStaticRoutes(manifest, target);
|
|
406
|
+
} catch (err) {
|
|
407
|
+
if (!(err instanceof PrerenderEntriesError)) throw err;
|
|
408
|
+
console.error(`❌ ${err.message}`);
|
|
409
|
+
process.exit(1);
|
|
410
|
+
}
|
|
411
|
+
}
|
|
404
412
|
|
|
405
413
|
// 10. Generate static site output (HTML + client assets + public → dist/static/)
|
|
406
414
|
if (!devBuild) generateStaticSite();
|