@decocms/start 0.32.1 → 0.32.2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decocms/start",
3
- "version": "0.32.1",
3
+ "version": "0.32.2",
4
4
  "type": "module",
5
5
  "description": "Deco framework for TanStack Start - CMS bridge, admin protocol, hooks, schema generation",
6
6
  "main": "./src/index.ts",
@@ -7,17 +7,18 @@ export function generateSetup(_ctx: MigrationContext): string {
7
7
  * This file is imported by router.tsx at startup.
8
8
  * It uses import.meta.glob to lazily discover all section components.
9
9
  */
10
+ import { blocks as generatedBlocks } from "./server/cms/blocks.gen";
10
11
  import {
11
12
  registerSections,
12
- loadBlocks,
13
13
  setBlocks,
14
14
  } from "@decocms/start/cms";
15
15
  import { registerBuiltinMatchers } from "@decocms/start/matchers/builtins";
16
16
 
17
17
  // -- CMS Blocks --
18
- // Load generated blocks at module level so they're available for resolution.
19
- const blocks = loadBlocks();
20
- setBlocks(blocks);
18
+ // The Vite plugin intercepts the blocks.gen import and injects .deco/blocks/ data.
19
+ if (typeof document === "undefined") {
20
+ setBlocks(generatedBlocks);
21
+ }
21
22
 
22
23
  // -- Section Registry --
23
24
  // Discovers all .tsx files under src/sections/ and registers them as CMS blocks.