Compare commits

...

3 Commits

Author SHA1 Message Date
f4e5f96f49 Merge pull request 'hotfix/markdoc' (#6) from hotfix/markdoc into main
All checks were successful
Update Memento Dev on VPS / deploy (push) Successful in 3m4s
Reviewed-on: #6
2025-04-18 10:09:04 +00:00
9ebf7f1cf7 docs: Add workaround comment for Markdoc export issue 2025-04-18 12:08:50 +02:00
ef64469637 refactor: Update import statement for Markdoc in Tag.ts 2025-04-18 12:07:15 +02:00

View File

@ -1,10 +1,15 @@
import type { RenderableTreeNode } from "@markdoc/markdoc"; import type { RenderableTreeNode } from "@markdoc/markdoc";
import type { ReactNode } from "react"; import type { ReactNode } from "react";
import { Tag as MarkdocTag } from "@markdoc/markdoc"; import Markdoc from "@markdoc/markdoc";
type TagAttributesValue = string | number | boolean | null | undefined | object | unknown; type TagAttributesValue = string | number | boolean | null | undefined | object | unknown;
// Workaround for Markdoc, that's not exporting the type
// in production build (Vite issue).
// See: https://stackoverflow.com/questions/76191154/the-requested-module-does-not-provide-an-export-named-default
const { Tag: MarkdocTag } = Markdoc;
export class Tag extends MarkdocTag { export class Tag extends MarkdocTag {
constructor( constructor(
name: string | ReactNode, name: string | ReactNode,