Skip to content
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

Why plugin can clear a directory only BEFORE build? #68

Closed
akaSybe opened this issue Oct 8, 2017 · 6 comments
Closed

Why plugin can clear a directory only BEFORE build? #68

akaSybe opened this issue Oct 8, 2017 · 6 comments

Comments

@akaSybe
Copy link

akaSybe commented Oct 8, 2017

What if I need to clear directory at the end of the build?

I need to build assets, create a zip file and remove everything in a directory except the zip file.
But looks like CleanWebpackPlugin everytime runs before all other plugins...

plugins: [
    new CleanWebpackPlugin(...),
    new CopyWebpackPlugin
    new StringReplacePlugin(),
    new ZipWebpackPlugin(...),
    new CleanWebpackPlugin(...)
]

Can you help me?

@clifgriffin
Copy link

I'm seeing this too.

@worenga
Copy link

worenga commented Oct 30, 2017

Same here.

@jackypan1989
Copy link

remove old file after webpack build
https://github.com/jackypan1989/del-webpack-plugin

@ChrisRAoW
Copy link
Contributor

Just submitted a pull request to fix this:
#72

@johnagan
Copy link
Owner

johnagan commented Nov 7, 2018

Hopefully resolved in #72.

@johnagan johnagan closed this as completed Nov 7, 2018
@chrisblossom
Copy link
Collaborator

For v2 use cleanAfterEveryBuildPatterns to solve this issue. Additional v2 Information can be found here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants