0.0.3 • Published 4 years ago

remove-file-webpack-plugin v0.0.3

Weekly downloads
5
License
MIT
Repository
github
Last release
4 years ago

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

属性名类型默认值说明
dirNamesArray 删除的目录名
fileNamesArray 删除的文件名
ignoreArray 忽略目录的绝对路径

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

Other

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

License

MIT