-
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
Does the order of clean-webpack-plugin matter? #200
Comments
No, it does not |
In my case the order was important and CleanWebpackPlugin should always be the first plugin to declare. Here is the issue: the CleanWebpackPlugin uses the emit hook to perform the initial clean stage. If any other plugin uses the same hook "emit" to write files to the output directory, the file will be deleted if the handler of the emit event of this particular plugin was called first. Example of such plugin is the "Chunks2JsonPlugin". Placing the Chunks2JsonPlugin before the CleanWebpackPlugin will remove the file generated by the Chunks2JsonPlugin |
Does the order of CleanWebpackPlugin matter?
In my project, I am running plugins in the below order, as you can see CleanWebpackPlugin is the last item in the array. Will that impact my build?
The text was updated successfully, but these errors were encountered: