remark-mdx-add-exports
v0.0.1
Published
remark plugin to add exports to MDX files
Downloads
1
Readme
remark-mdx-add-exports
Usage
import { remark } from 'remark'
import { remarkMdxAddExports } from 'remark-mdx-add-exports'
let exports = [['BlogLayout', 'default', '@/layouts/BlogLayout']]
await remark()
.use(remarkMdxAddExports, ...exports)
.process('# Hello world')
Examples
['getStaticProps', './getStaticProps']
// => export { getStaticProps } from './getStaticProps'
['BlogLayout', 'default', '@/layouts/BlogLayout']
// => export { BlogLayout as default } from '@/layouts/BlogLayout'