Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/kumo-docs-astro/src/lib/vite-plugin-kumo-colors.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { dirname, resolve } from "node:path";
import { fileURLToPath } from "node:url";
// Import directly from source to avoid requiring a build step in dev mode
import {
THEME_CONFIG,
AVAILABLE_THEMES,
} from "@cloudflare/kumo/scripts/theme-generator/config";
import type { TokenDefinition } from "@cloudflare/kumo/scripts/theme-generator/types";
} from "../../../kumo/scripts/theme-generator/config.js";
import type { TokenDefinition } from "../../../kumo/scripts/theme-generator/types.js";

const __dirname = dirname(fileURLToPath(import.meta.url));

Expand Down
8 changes: 8 additions & 0 deletions packages/kumo-docs-astro/src/lib/vite-plugin-kumo-hmr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@ export function kumoHmrPlugin() {
return resolve(kumoSrc, "registry/index.ts");
}

// Code barrel
if (source === "@cloudflare/kumo/code") {
return resolve(kumoSrc, "code/index.ts");
}
if (source === "@cloudflare/kumo/code/server") {
return resolve(kumoSrc, "code/server.ts");
}

// Catch-all for any other @cloudflare/kumo/styles/* CSS imports
if (source.startsWith("@cloudflare/kumo/styles/")) {
const styleName = source.replace("@cloudflare/kumo/styles/", "");
Expand Down