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

Files copied with CopyWebpackPlugin deleted in watch mode after first code modification #5

Closed
1 of 3 tasks
Wyzix33 opened this issue May 9, 2019 · 2 comments
Closed
1 of 3 tasks
Assignees
Labels

Comments

@Wyzix33
Copy link

Wyzix33 commented May 9, 2019

This repository's issues are reserved for mainly feature requests and bug reports.

  • I'm submitting a ...

    • bug report
    • feature request
    • support request
  • What is the current behavior?
    After npm install i run

npm run watch

and after the first file change and browser reload all the images copied by CopyWebpackPlugin get deleted...
it seems that if i remove the new CleanWebpackPlugin(), from plugins it's ok, but CopyWebpackPlugin is not executed on code modifications...

I solved it for now by setting new CleanWebpackPlugin({ cleanStaleWebpackAssets: false }),
it's not ideal but i have to test some more...

  • What is the expected behavior?

Images should all be recopied and available as they are before first modification

  • Please tell us about your environment:

    • Version: 2.5.0
    • System / OS / Browser: [ Windows]
    • Language: [all | SASS | ES6/7 | ES5 ]

Thanks

@pnikolov pnikolov self-assigned this May 13, 2019
@pnikolov pnikolov added the bug label May 13, 2019
@pnikolov
Copy link
Member

@Wyzix33 thanks for the feedback, I will further investigate this behaviour and will update the configuration/documentation.

@pnikolov
Copy link
Member

After a further research I found that the latest version of Clean Webpack Plugin has this side effect/bug - V2 dist folder content is deleted before webpack start building

It seems to be fixed but it is not released yet. So until an official release I've released a new version of the boilerplate to use v1.0.1 of the clean-webpack-plugin plugin instead of the latest v2.0.2.

Here is the latest release containing this change together with a couple of new updates - Release 2.6.0

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

No branches or pull requests

2 participants