You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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: