mirror of
https://github.com/luc-github/ESP3D-WEBUI.git
synced 2026-03-04 15:14:02 +01:00
27 lines
655 B
JavaScript
27 lines
655 B
JavaScript
/**
|
|
* A plugin for webpack which removes files and folders before and after compilation.
|
|
* Docs: https://github.com/Amaimersion/remove-files-webpack-plugin
|
|
*/
|
|
|
|
const RemoveFilesWebpackPlugin = require("remove-files-webpack-plugin")
|
|
|
|
const config = {
|
|
before: {
|
|
include: ["dist"],
|
|
},
|
|
after: {
|
|
exclude: ["dist/index.html.gz"],
|
|
test: [
|
|
{
|
|
folder: "./dist",
|
|
method: filePath => {
|
|
return new RegExp(/\.*$/, "m").test(filePath)
|
|
},
|
|
},
|
|
],
|
|
log: true,
|
|
},
|
|
}
|
|
|
|
export default () => new RemoveFilesWebpackPlugin(config)
|