🚀 中文文档点这里
A plugin for webpack removes files and folders before compiler.
To begin, you'll need to install remove-file-webpack-plugin:
npm install --save-dev remove-file-webpack-plugin
Then add the plugin to your webpack config.
For example:
webpack.config.js
const RemoveFileWebpackPlugin = require('remove-file-webpack-plugin');
module.exports = {
plugins: [
new RemoveFileWebpackPlugin({
dirNames:['dir_1'],
fileNames:['file_1.js'],
})
],
};
Options
Name | Type | Default | Description |
---|---|---|---|
dirNames | {Array} | [ ] | Directory name to delete |
fileNames | {Array} | [ ] | File name to delete |
ignore | {Array} | [ ] | Absolute path to directory to ignore |
P.S:node_ Modules will be ignored by default and do not need to be added to ignore
If you have any questions, please create an issue on GitHub.