Closed maddhruv closed 4 years ago
@johnagan
This is already built into this library via the npm package del. You can use the dangerouslyAllowCleanPatternsOutsideProject to override.
Allow clean patterns outside of process.cwd()
it says this but clean is by default about output.path and i dont think this option even saves your project root
Allow clean patterns outside of process.cwd()
it says this but clean is by default about output.path and i dont think this option even saves your project root
I don't really understand this comment.
Currently you cannot remove your project root without setting dangerouslyAllowCleanPatternsOutsideProject: true
and dry: false
via del
.
Have you had an issue with this not working?
I haven't enabled these options but still mistakenly deleted the project's root
I haven't enabled these options but still mistakenly deleted the project's root
Can you provide the options you used to remove your project's root? I'd like to add a test case for this.
@chrisblossom Not sure if thats the same problem, but when I set my config to an empty object like
new CleanWebpackPlugin({}),
the build fails (error message here) and the whole project gets wiped.
Codecov Report
97.77% <50%> (-1.09%)
Continue to review full report at Codecov.