diff options
author | 2023-05-24 17:02:04 +0800 | |
---|---|---|
committer | 2023-05-24 17:02:04 +0800 | |
commit | 27c6e01826a6da525f1f811d97784accd1ebbd96 (patch) | |
tree | 1c3e3d5d9afec21373ef270bc5350a56ed6d1acb /packages/integrations/mdx/src/plugins.ts | |
parent | 2bda7fb0bce346f7725086980e1648e2636bbefb (diff) | |
download | astro-27c6e01826a6da525f1f811d97784accd1ebbd96.tar.gz astro-27c6e01826a6da525f1f811d97784accd1ebbd96.tar.zst astro-27c6e01826a6da525f1f811d97784accd1ebbd96.zip |
Remove `@mdx-js/rollup` dependency (#7191)
Diffstat (limited to 'packages/integrations/mdx/src/plugins.ts')
-rw-r--r-- | packages/integrations/mdx/src/plugins.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/packages/integrations/mdx/src/plugins.ts b/packages/integrations/mdx/src/plugins.ts index 859cf3bbe..af9950451 100644 --- a/packages/integrations/mdx/src/plugins.ts +++ b/packages/integrations/mdx/src/plugins.ts @@ -5,7 +5,6 @@ import { } from '@astrojs/markdown-remark/dist/internal.js'; import { nodeTypes } from '@mdx-js/mdx'; import type { PluggableList } from '@mdx-js/mdx/lib/core.js'; -import type { Options as MdxRollupPluginOptions } from '@mdx-js/rollup'; import type { AstroConfig } from 'astro'; import type { Literal, MemberExpression } from 'estree'; import { visit as estreeVisit } from 'estree-util-visit'; @@ -99,7 +98,7 @@ export function rehypeApplyFrontmatterExport() { export async function getRemarkPlugins( mdxOptions: MdxOptions, config: AstroConfig -): Promise<MdxRollupPluginOptions['remarkPlugins']> { +): Promise<PluggableList> { let remarkPlugins: PluggableList = [ ...(config.experimental.assets ? [remarkCollectImages, remarkImageToComponent] : []), ]; @@ -128,7 +127,7 @@ export async function getRemarkPlugins( return remarkPlugins; } -export function getRehypePlugins(mdxOptions: MdxOptions): MdxRollupPluginOptions['rehypePlugins'] { +export function getRehypePlugins(mdxOptions: MdxOptions): PluggableList { let rehypePlugins: PluggableList = [ // ensure `data.meta` is preserved in `properties.metastring` for rehype syntax highlighters rehypeMetaString, |