You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
module.exports={ parallel: false,// Disable thread-loader which will cause errors, we are still investigating the root cause chainWebpack: (config)=>{ config.module .rule('vue') .test(/\.(vue|md)$/)// <-- allows Vue to compile Markdown files
unplugin-vue-markdown uses markdown-exit under the hood, a TypeScript rewrite of markdown-it with built-in async rendering. markdown-it plugins are compatible.
Note: The old option names (markdownItOptions, markdownItUses, markdownItSetup) are deprecated but still functional.
exportdefault{ plugins: [ Markdown({ // default options passed to markdown-exit markdownOptions: { html: true, linkify: true, typographer: true, }, // A function providing the markdown-exit instance gets the ability to apply custom settings/plugins markdownSetup(md){ // for example md.use(MarkdownItAnchor) md.use(MarkdownItPrism) }, // Class names for the wrapper div wrapperClasses: 'markdown-body' }) ], }
exportdefault{ plugins: [ Vue({ include: [/\.vue$/,/\.md$/], }), Markdown(), // should be placed after `Markdown()` Components({ // allow auto load markdown components under `./src/components/` extensions: ['vue','md'],
// allow auto import and register components used in markdown include: [/\.vue$/,/\.vue\?vue/,/\.md$/], }) ], }
Components under ./src/components can be directly used in markdown components, and markdown components can also be put under ./src/components to be auto imported.