Skip to content

Latest commit

 

History

History
55 lines (40 loc) · 1.22 KB

README.CN.md

File metadata and controls

55 lines (40 loc) · 1.22 KB

remove-file-webpack-plugin

image image

介绍

webpack插件,用于删除项目下指定的文件和目录。

安装

下载remove-file-webpack-plugin

npm install --save-dev remove-file-webpack-plugin

配置

webpack.config.js

const RemoveFileWebpackPlugin = require('remove-file-webpack-plugin'); 
module.exports = {
    plugins: [
        new RemoveFileWebpackPlugin({
            dirNames:['dir_1'],
            fileNames:['file_1.js'],
        })
    ],
};

Options

属性名 类型 默认值 说明
dirNames Array [ ] 删除的目录名
fileNames Array [ ] 删除的文件名
ignore Array [ ] 忽略目录的绝对路径

注:node_modules 默认会被忽略,不需添加到 ignore

Other

如果你有任何疑问,欢迎提交issue到 GitHub.

License

MIT