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

When running with watch, assets fail to regenerate on save #153

Open
JerrettDavis opened this issue May 1, 2019 · 1 comment
Open

When running with watch, assets fail to regenerate on save #153

JerrettDavis opened this issue May 1, 2019 · 1 comment

Comments

@JerrettDavis
Copy link

If you are running any of the webpack scripts with watch enabled, the clean process wipes out assets, but does not replace the deleted files. If you add an image to the images folder, the new asset is picked up and placed in the assets folder, but the rest of the images are not transferred.

The only fix I've found so far is to disable the cleanStateWebpackAssets option, but this isn't optimal.

        new CleanWebpackPlugin({
            cleanOnceBeforeBuildPatterns: ['./wwwroot/dist', './wwwroot/assets'],
            cleanStaleWebpackAssets: false, // It's been removing all images, we want to leave those in place.
            root: ROOT
        }),
@damienbod
Copy link
Owner

@JerrettDavis Thanks, I will add this

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

2 participants