1.0.1 • Published 6 years ago

raw-content-replace-loader v1.0.1

Weekly downloads
29
License
MIT
Repository
github
Last release
6 years ago
npm install --save-dev raw-content-replace-loader

Use the loader either via your webpack config, CLI or inline.

webpack.config.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: '___',               // 文件名存储,文件夹+下划线间隔+文件名
            }
          }
        ]
      }
    ]
  }
}
1.0.1

6 years ago

1.0.0

6 years ago