unused-files-webpack-plugin icon indicating copy to clipboard operation
unused-files-webpack-plugin copied to clipboard

`ignore` does not do anything

Open dancrumb opened this issue 6 years ago • 4 comments

The documentation includes an ignore option, but it doesn't do anything and the source code doesn't appear to reference it at all.

dancrumb avatar Aug 23 '18 16:08 dancrumb

@dancrumb You should specify globOptions.ignore.

mpaulucci avatar Oct 02 '18 23:10 mpaulucci

An alternative I've used is to pass in patterns prepended with ! which will be ignored.

naganowl avatar Oct 18 '18 22:10 naganowl

I ran into this problem today as well. Docs are certainly misleading: This works though as @mpaulucci has mentioned:

new UnusedFilesWebpackPlugin({
            globOptions: {
                ignore: ["node_modules/**/*", "**/*.test.*", "**/*.config.*", "**/__mocks/**/*"]
            }
        })

abharvey avatar Nov 19 '18 15:11 abharvey

@abharvey answer should be in docs

cristovao-trevisan avatar Jan 30 '19 01:01 cristovao-trevisan