https://github.com/react-doc/raw-content-replace-loader
Replaces the specified path file contents.
https://github.com/react-doc/raw-content-replace-loader
rdoc react-doc webpack webpack-loader
Last synced: about 2 months ago
JSON representation
Replaces the specified path file contents.
- Host: GitHub
- URL: https://github.com/react-doc/raw-content-replace-loader
- Owner: react-doc
- Created: 2018-01-05T20:21:51.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-05T20:50:39.000Z (over 7 years ago)
- Last Synced: 2025-03-15T18:53:21.684Z (3 months ago)
- Topics: rdoc, react-doc, webpack, webpack-loader
- Language: JavaScript
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Install
```bash
npm install --save-dev raw-content-replace-loader
```Usage
Use the loader either via your webpack config, CLI or inline.
**webpack.config.js**
```js
module.exports = {
module: {
rules: [
{
test: /\.md$/,
use: [
{
loader: require.resolve('raw-content-replace-loader'),
options: {
// include: /rdoc\.tree\.data\.json$/, // 检查包含的文件名字
// extensions: /\.md/,
path: PATH.join(cachePath, './md'), // 需要替换的目录
replace: cmd.projectRoot, // 替换成目标目录
sep: /___/g, // 文件名存储,文件夹+下划线间隔+文件名
}
}
]
}
]
}
}
```