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

Excluding files & folders not working #204

Open
necm1 opened this issue Nov 18, 2021 · 1 comment
Open

Excluding files & folders not working #204

necm1 opened this issue Nov 18, 2021 · 1 comment

Comments

@necm1
Copy link

necm1 commented Nov 18, 2021

Issue description or question

Writing ! before file and / or folder seems not to work. My file & folder is still getting removed after the build succeed.

Webpack Config

    plugins: [
        new CleanWebpackPlugin({
            protectWebpackAssets: false,
            cleanAfterEveryBuildPatterns: ['*.LICENSE.txt', '!manifest.json', '!assets/**']
        })
    ]

Environment

 System:
    OS: Windows 10 10.0.22000
    CPU: (16) x64 AMD Ryzen 7 3700X 8-Core Processor
    Memory: 7.16 GB / 15.44 GB
  Binaries:
    Node: 17.1.0 - C:\Program Files\nodejs\node.EXE
    npm: 8.1.2 - C:\Program Files\nodejs\npm.CMD
  npmPackages:
    clean-webpack-plugin: ^4.0.0 => 4.0.0
    webpack: ^5.64.1 => 5.64.1
@kachaj7
Copy link

kachaj7 commented Dec 7, 2021

Add this to the configuration:

        cleanOnceBeforeBuildPatterns: [
          '**/*',
          '!manifest.json', 
           '!assets/**'
        ],     

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