-
Notifications
You must be signed in to change notification settings - Fork 136
Closed
Description
I'm trying to prevent the plugin from removing a specific file in an output directory above the current context. This seems to work if it's within the current context, but not in a parent or adjacent folder. Here is my config:
new CleanWebpackPlugin(['build/*', '../api/build/*'],{
root: path.resolve(__dirname), // set root to parent so we can clean ../api/build/
allowExternal: true,
exclude: ['app.js'],
verbose: true,
dry: false,
watch: true
}),
There is the file 'app.js' within '../api/build/' that it keeps deleting. I have also tried to put the full path of the file, ie: path.resolve(__dirname, '../api/build') + '/app.js' and similar things, but can't prevent it from deleting.
I've also tried just making a separate plugin definition for the parent folder, but it seems to still delete it, oddly:
new CleanWebpackPlugin(['build/**.js'],{
root: path.resolve(__dirname, '../api'), // set root to parent so we can clean ../api/build/
exclude: ['app.js'],
verbose: true,
watch: true
}),
Any ideas?
vultix, findingsimple, manuel-di-iorio, Yidada and christoz
Metadata
Metadata
Assignees
Labels
No labels