Skip to content

Commit

Permalink
(next/mdx) set providerImportSource to react by default (#39954)
Browse files Browse the repository at this point in the history
Hello, this PR simply configures the `next/mdx` package to use `{ providerImportSource: '@mdx-js/react' }` by default. This is now [required in version 2](https://mdxjs.com/packages/mdx/#optionsproviderimportsource) and causes a lot of confusion personally because `MDXProvider` seems to not work when all is needed is to set this option.

Co-authored-by: JJ Kasper <jj@jjsweb.site>
  • Loading branch information
souporserious and ijjk committed Aug 26, 2022
1 parent e5997dc commit c6dafda
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/next-mdx/index.js
Expand Up @@ -11,7 +11,10 @@ module.exports =
options.defaultLoaders.babel,
{
loader: require.resolve('@mdx-js/loader'),
options: pluginOptions.options,
options: {
providerImportSource: '@mdx-js/react',
...pluginOptions.options,
},
},
],
})
Expand Down

0 comments on commit c6dafda

Please sign in to comment.