@honeydeck/honeydeck 0.11.0 → 0.11.1
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/vite-plugin/SPEC.md +1 -1
- package/src/vite-plugin/index.ts +11 -0
package/package.json
CHANGED
package/src/vite-plugin/SPEC.md
CHANGED
|
@@ -69,7 +69,7 @@ React components and built-in layouts may also import image assets through Vite
|
|
|
69
69
|
|
|
70
70
|
### Timeline-aware MDX Components
|
|
71
71
|
|
|
72
|
-
Honeydeck's MDX compilation assigns slide-local timeline steps to built-in timeline components.
|
|
72
|
+
Honeydeck's MDX compilation assigns slide-local timeline steps to built-in timeline components. During development, Honeydeck runtime imports from `@honeydeck/honeydeck` must resolve to the same source module graph as the app shell and must be excluded from Vite dependency pre-bundling, so context-backed timeline components such as `<Reveal>` read the active slide timeline instead of a duplicate default runtime context.
|
|
73
73
|
|
|
74
74
|
Rules:
|
|
75
75
|
|
package/src/vite-plugin/index.ts
CHANGED
|
@@ -39,6 +39,10 @@ import { virtualModulesPlugin } from "./virtual-modules.ts";
|
|
|
39
39
|
// ESM-safe equivalent of __dirname
|
|
40
40
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
41
41
|
|
|
42
|
+
export const HONEYDECK_OPTIMIZE_DEPS_EXCLUDE = [
|
|
43
|
+
"@honeydeck/honeydeck",
|
|
44
|
+
] as const;
|
|
45
|
+
|
|
42
46
|
// ---------------------------------------------------------------------------
|
|
43
47
|
// Types
|
|
44
48
|
// ---------------------------------------------------------------------------
|
|
@@ -333,6 +337,13 @@ export function honeydeckPlugin(
|
|
|
333
337
|
},
|
|
334
338
|
],
|
|
335
339
|
},
|
|
340
|
+
optimizeDeps: {
|
|
341
|
+
// Keep Honeydeck source imports in the same module graph as the
|
|
342
|
+
// app shell. If Vite pre-bundles the published package separately,
|
|
343
|
+
// context-backed components such as <Reveal> read a duplicate
|
|
344
|
+
// TimelineContext and stay hidden even when the slide step advances.
|
|
345
|
+
exclude: [...HONEYDECK_OPTIMIZE_DEPS_EXCLUDE],
|
|
346
|
+
},
|
|
336
347
|
};
|
|
337
348
|
},
|
|
338
349
|
} satisfies Plugin,
|