Open silvenon opened 6 years ago
I'm not sure if there's currently a way to extend or override MDX configuration. One way could be to use smart merging. Another way could be to add a mdx field in x0 configuration in package.json:
mdx
x0
package.json
"x0": { "mdx": "./mdx.config.js" }
// mdx.config.js const math = require('remark-math') const katex = require('rehype-katex') module.exports = ({ defaultMdPlugins, defaultHastPlugins }) => ({ mdPlugins: [ ...defaultMdPlugins, math, ], hastPlugins: [ ...defaultHastPlugins, katext, ], })
I prefer the latter strategy. Even though it results in an additional configuration file, it's probably more straightforward to implement and use.
I'm not sure if there's currently a way to extend or override MDX configuration. One way could be to use smart merging. Another way could be to add a
mdx
field inx0
configuration inpackage.json
:I prefer the latter strategy. Even though it results in an additional configuration file, it's probably more straightforward to implement and use.