raw-tree-replace-loader
v1.1.0
Published
raw tree replace loader module for webpack
Downloads
5
Readme
npm install --save-dev raw-tree-replace-loader
webpack.config.js
module.exports = {
module: {
rules: [
{
test: /\.json$/,
use: [
{
loader: require.resolve('raw-tree-replace-loader'),
options: {
include: /rdoc\.tree\.data\.json$/, // 检查包含的文件名字
extensions: /\.md/,
directoryTrees: { // 指定目录生成目录树,json
dir: ['/path/to/dir'],
mdconf: true,
extensions: /\.md/,
relativePath: true, // 获取相对目录, dir 参数替换,路径的前部分
}
}
}
]
}
]
}
}