-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removes whole project when outputpath is root #183
Comments
What about use cleanOnceBeforeBuildPatterns option, and then you can only remove the files that match your defined patterns. |
Edit: the removal of the working directory is caused by new CleanWebpackPlugin({
cleanOnceBeforeBuildPatterns: ['bundle.js']
}) |
this happened to me just now! luckily I had the backup of my project. Please document this in the readme and warn users of such incidents |
Yes, this is very bad indeed. Even the |
They should put a check for the root directory ASAP! |
It removes everything except webpack files !!! |
Issue description or question
When using
clean-webpack-plugin
when webpacksoutput.path
is the project root, everything is blindly deleted including the.git
directory.IMO it should only remove old build assets - I don't know if it's possible to find out which one are build assets and which one are not.
Webpack Config
The config is in
webpack/base.config.js
.Environment
The text was updated successfully, but these errors were encountered: