You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+5-3
Original file line number
Diff line number
Diff line change
@@ -7,8 +7,8 @@ A webpack plugin to remove unwanted files which may have been created and output
7
7
When using ExtractTextPlugin, it's not possible to generate a css file for each chunk webpack outputs, if you're using [code splitting](https://webpack.js.org/guides/code-splitting/).
8
8
9
9
The only possible way to do this is to have an entry point for each top level css / less / scss file, however this will create small js files with empty webpack functions in them, which are undesirable.
10
-
11
-
This plugin removes files which are under a certain byte size, after everything has been compiled and output. It can also remove these files from your `manifest.json` file if you are using the [webpack manifest plugin](https://github.com/danethurber/webpack-manifest-plugin) or something similar to it.
10
+
11
+
This plugin removes files which are under a certain byte size, after everything has been compiled and output. It can also remove these files from your `manifest.json` file if you are using the [webpack manifest plugin](https://github.com/danethurber/webpack-manifest-plugin) or something similar to it.
12
12
13
13
## Usage
14
14
@@ -47,10 +47,12 @@ The ExtraneousFileCleanupPlugin accepts an object of options with the following
47
47
newExtraneousFileCleanupPlugin({
48
48
extensions: ['.extensions', '.to', '.whitelist'],
49
49
minBytes:1024,
50
-
manifestJsonName:'manifest.json'
50
+
manifestJsonName:'manifest.json',
51
+
paths: ['/dist/removeFromThisPath']
51
52
})
52
53
```
53
54
54
55
*`extensions` - a list of extensions we're allowed to analyze for their file size. Useful for not removing small `.js.map` files, or small `.css` files. Defaults to analyzing all file types.
55
56
*`minBytes` - the minimum byte size a file has to meet to not be deleted. Defaults to 1024 bytes.
56
57
*`manifestJsonName` - if you're outputting a `manifest.json` file, this plugin will also remove deleted files from the manifest. Defaults to `manifest.json`
58
+
* paths - an array of strings to specify which if any paths you want to limit the searching to. If this is defined, files will only be removed from those paths.
0 commit comments