2.0.0 • Published 4 years ago
wx-md-loader v2.0.0
wx-md-loader
A simple webpack loader used to parse markdown fence block to JS executable code
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:booleandefaulttrue, control whether or not to use configuration whosecwd:
stringdefaultprocess.cwd(), specify the reference directory for scanning, and try to control to the minimum group to reduce the consumptiontemplate:
stringdefault use modulewx-api-docsgroups:
arrayIndicates the route entry information generated by the scaninject:
objectdefault{}, you can inject some data by yourselftype:
stringdefaultdefault, enum value can bedefaultorsource,defaultused to parse markdown andsourceused to generate markdown meta information
LICENSE
MIT