wx-md-loader
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

wx-md-loader

A simple webpack loader used to parse markdown fence block to JS executable code

npm deps license build prs

Configuration

const rules = [
  {
    test: /\.md/,
    use: [
      {
        loader: 'babel-loader',
      },
      {
        loader: 'wx-md-loader',
        groups: [
          {
            title: 'Docs Center',
            route: '/docs',
            basePath: './docs',
          },
          {
            title: 'My Components',
            route: '/components',
            basePath: './components',
          },
        ],
      },
    ]
  }
]

Options

  • configFile: boolean default true , control whether or not to use configuration whose

  • cwd: string default process.cwd(), specify the reference directory for scanning, and try to control to the minimum group to reduce the consumption

  • template: string default use modulewx-api-docs

  • groups: array Indicates the route entry information generated by the scan

  • inject: object default {}, you can inject some data by yourself

  • type: string default default, enum value can be default or source,default used to parse markdown and source used to generate markdown meta information

LICENSE

MIT

Package Sidebar

Install

npm i wx-md-loader

Weekly Downloads

4

Version

2.0.0

License

MIT

Unpacked Size

36 kB

Total Files

24

Last publish

Collaborators

  • ixw2017