https://github.com/react-doc/create-spare-webpack-plugin
Store a JSON mapping of a directory.
https://github.com/react-doc/create-spare-webpack-plugin
rdoc react-doc webpack webpack-loader
Last synced: 2 months ago
JSON representation
Store a JSON mapping of a directory.
- Host: GitHub
- URL: https://github.com/react-doc/create-spare-webpack-plugin
- Owner: react-doc
- Created: 2018-01-06T18:56:49.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-24T04:44:12.000Z (about 7 years ago)
- Last Synced: 2025-02-15T01:43:57.612Z (4 months ago)
- Topics: rdoc, react-doc, webpack, webpack-loader
- Language: JavaScript
- Homepage:
- Size: 2.93 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Create Spare Webpack Plugin
---Install the plugin via NPM:
```bash
npm i create-spare-webpack-plugin --save
```**webpack.config.js**
```js
module.exports = {
entry: './src/index.js',
plugins: [
new CreateSpareWebpackPlugin({
// 备用文件目录,比对是否存在,不存在生成,根据sep 目录规则生成
path: PATH.join(cachePath, './md'),
sep: '___', // 检查目标目录文件,文件名存储,文件夹+下划线间隔+文件名
directoryTrees: { // 索引目录
dir: cmd.markdownDirs,
mdconf: true,
extensions: /\.md$/,
},
}),
]
}
```