项目作者: jaredLunde

项目描述 :
Use the MDX compiler to build .mdx and .md files in Snowpack
高级语言: TypeScript
项目地址: git://github.com/jaredLunde/snowpack-plugin-mdx.git
创建时间: 2020-07-24T21:15:57Z
项目社区:https://github.com/jaredLunde/snowpack-plugin-mdx

开源协议:MIT License

下载





snowpack-plugin-mdx


Use the MDX compiler to build .mdx and .md files in Snowpack

  1. npm i -D snowpack-plugin-mdx @mdx-js/mdx @mdx-js/react




Types


Code coverage


Build status


NPM Version


MIT License


Quick start

  1. // snowpack.config.json
  2. {
  3. "plugins": [["snowpack-plugin-mdx", { /* see "Plugin Options" below */ }]]
  4. }

Plugin Options

  1. interface SnowpackPluginMdxOptions {
  2. /**
  3. * Includes only the specified paths
  4. */
  5. include?: string[]
  6. /**
  7. * Excludes the specified paths
  8. */
  9. exclude?: string[]
  10. /**
  11. * These options are passed directly to babel.transformAsync()
  12. */
  13. babelOptions?: TransformOptions
  14. /**
  15. * These options are passed directly to the MDX compiler
  16. */
  17. mdxOptions?: Record<string, any>
  18. /**
  19. * Override the default renderer
  20. *
  21. * @default ```js
  22. * import React from 'react'
  23. * import { mdx } from '@mdx-js/react'
  24. * ```
  25. */
  26. renderer?: string
  27. }

LICENSE

MIT