Skip to content

[Bug report] markdown-it plugin cant load by using config.markdown.plugins config. #2175

@yibhou

Description

@yibhou
  • I confirm that this is an issue rather than a question.

Bug report

Steps to reproduce

What is expected?

Using config below can correctly load markdown-it plugin like the doc.

module.exports = {
  markdown: {
    plugins: [
      'markdown-it-sub'
      // or
      ['markdown-it-xxx', { /* options */ }]
    ]
  }
}

Actually it cant load any markdown-it plugins. But loading correctly in using markdown.extendMarkdown like:

markdown: {
    extendMarkdown: md => {
      md.use(require('markdown-it-sub'))
    }
  }

What is actually happening?

Actually cant load any markdown-it plugins

Other relevant information

  • Output of npx vuepress info in my VuePress project:
Environment Info:

  System:
    OS: macOS Mojave 10.14.6
    CPU: (12) x64 Intel(R) Core(TM) i7-8700B CPU @ 3.20GHz
  Binaries:
    Node: 10.15.2 - ~/.nvm/versions/node/v10.15.2/bin/node
    Yarn: 1.22.0 - ~/Documents/Projects/oh-my-test/src/blog/node_modules/.bin/yarn
    npm: 6.4.1 - ~/.nvm/versions/node/v10.15.2/bin/npm
  Browsers:
    Chrome: 80.0.3987.87
    Firefox: 71.0
    Safari: 12.1.2
  npmPackages:
    @vuepress/core:  1.3.0 
    @vuepress/theme-default:  1.3.0 
    vuepress: ^1.3.0 => 1.3.0 
  npmGlobalPackages:
    vuepress: Not Found

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions