I am trying to export astro Component as a field of an object in a .ts file is throwing the following error
Pre-transform error: Failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the file with the .jsx or .tsx extension.
even if i rename the file to .jsx or .tsx the same is happening,
here is the example code
// file: accordion-item.markdoc.ts
import Accordion from "../../components/Accordion.astro";
import type { AstroMdocConfig } from "astro-mdoc/src/config";
export const Accordion = {
"AccordionItem": {
render: Accordion as any,
children: ['paragraph', 'tag', 'list'],
attributes: {
heading: {
type: String,
},
content: {
type: String,
}
}
}
} satisfies AstroMdocConfig['tags'] as AstroMdocConfig;
// file: index.ts
import { Accordion } from "./accordion-item.markdoc";
export {
Accordion
}