fix: remove rollup type import

This commit is contained in:
bholmesdev 2023-03-17 19:05:40 -04:00
parent 1c41762e8c
commit 0f06166eb4

View file

@ -3,7 +3,6 @@ import Markdoc from '@markdoc/markdoc';
import type { AstroConfig, AstroIntegration, ContentEntryType, HookParameters } from 'astro'; import type { AstroConfig, AstroIntegration, ContentEntryType, HookParameters } from 'astro';
import fs from 'node:fs'; import fs from 'node:fs';
import { fileURLToPath } from 'node:url'; import { fileURLToPath } from 'node:url';
import type * as rollup from 'rollup';
import { getAstroConfigPath, MarkdocError, parseFrontmatter } from './utils.js'; import { getAstroConfigPath, MarkdocError, parseFrontmatter } from './utils.js';
type IntegrationWithPrivateHooks = { type IntegrationWithPrivateHooks = {
@ -36,7 +35,7 @@ export default function markdoc(markdocConfig: Config = {}): IntegrationWithPriv
addContentEntryType({ addContentEntryType({
extensions: ['.mdoc'], extensions: ['.mdoc'],
getEntryInfo, getEntryInfo,
getRenderModule({ entry }: any): Partial<rollup.LoadResult> { getRenderModule({ entry }) {
validateRenderProperties(markdocConfig, config); validateRenderProperties(markdocConfig, config);
const ast = Markdoc.parse(entry.body); const ast = Markdoc.parse(entry.body);
const content = Markdoc.transform(ast, { const content = Markdoc.transform(ast, {