Skip to content

Commit

Permalink
configure plain markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
souporserious committed May 14, 2024
1 parent 76ede2b commit 15ffbfb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/honest-deers-hug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"mdxts": patch
---

Configure plain markdown files in addition to mdx files for loader.
5 changes: 4 additions & 1 deletion packages/mdxts/src/next/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ export function createMdxtsPlugin(pluginOptions: PluginOptions) {

return async (phase: typeof PHASE_DEVELOPMENT_SERVER) => {
const plugins = await getMdxPlugins({ gitSource, gitBranch })
const withMdx = createMdxPlugin({ options: plugins })
const withMdx = createMdxPlugin({
options: plugins,
extension: /\.(md|mdx)$/,
})

nextConfig.webpack = (config, options) => {
// add default mdx components before @mdx-js/react
Expand Down

0 comments on commit 15ffbfb

Please sign in to comment.