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

Behavior changed? Gets removed every rebuild. #31

Closed
fritx opened this issue Oct 11, 2016 · 6 comments
Closed

Behavior changed? Gets removed every rebuild. #31

fritx opened this issue Oct 11, 2016 · 6 comments

Comments

@fritx
Copy link

fritx commented Oct 11, 2016

Hello there,
I've been used this module since Jan or Feb, 2016. (v0.1.4-v0.1.10)
Recently I re-installed this module (updated), and things changed.

Dist directory gets removed after every single rebuild.
My expected behavior was to clean just at the first time.
I couldn't find any documentation.

@johnagan
Copy link
Owner

See #29 - Sorry for the trouble @fritx

@eladnava
Copy link

According to #29 (comment), this bug has not been fixed unfortunately.

Please reopen this issue. 👍

@tylerhou
Copy link
Contributor

tylerhou commented Nov 3, 2016

@eladnava This bug has been fixed in the latest version (which was a rollback of my original pull request), so it should remain closed.

@eladnava
Copy link

@tylerhou I'm still experiencing a full directory deletion instead of just the files inside with the latest version, using this code:

plugins: [
        new CleanWebpackPlugin(['build'])
]

@scott-thrillist
Copy link

Same issue as @eladnava

@tylerhou
Copy link
Contributor

tylerhou commented Dec 6, 2016

So this issue specifically is about deletion on watch. That is, if you were running webpack --watch, you would have seen the directories be deleted every single time you changed your code and webpack recompiled. That was an undocumented change (my apologies) and has been fixed with the rollback.

On the other hand, full directory deletion is intentional. If you want to delete files inside the directory, you'll have to specify them individually. For most users the difference between deletion of a directory and deletion of all the files inside a directory but not the directory itself is negligible, since usually webpack would immediately recreate it on compile.

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

5 participants