Skip to content

Commit

Permalink
fix: use correct file path when fetching Remark plugins
Browse files Browse the repository at this point in the history
..for an imported .mdx/.md file
  • Loading branch information
aleclarson committed Apr 6, 2021
1 parent 0f05ecb commit 4443355
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ function createPlugin(

return resolved?.id
},
getCompiler() {
getCompiler(filePath) {
const remarkPlugins = mergeArrays(
globalMdxOptions.remarkPlugins,
getMdxOptions?.(id).remarkPlugins
getMdxOptions?.(filePath).remarkPlugins
)
remarkPlugins.push(mdxImportPlugin)
return mdx.createMdxAstCompiler({
Expand Down

0 comments on commit 4443355

Please sign in to comment.