Commit Graph

10 Commits

Author SHA1 Message Date
Alexander Akait 16c6966b14
fix: types 2025-09-11 03:10:10 +03:00
Ivan Kopeykin 8068923063 fix IgnorePlugin schema 2021-09-11 13:55:24 +03:00
Tobias Koppers 016fc28fd5 stricter linting
oneOf for references
anyOf for alternatives
2020-03-26 12:03:53 +01:00
Tobias Koppers 87e6f58786 Ensure strict format of descriptions in schemas 2020-03-10 18:19:33 +01:00
Tobias Koppers 0505e177f1 add more types and fix/remove TODOs
change Chunk.files to Set
remove checkContext from IgnorePlugin
remove external flag from ExternalModule
2019-06-14 10:45:56 +02:00
Ilya Kantor a9d465f183 IgnorePlugin: add context argument to checkResource, deprecate checkContext 2018-12-18 11:27:06 +03:00
Tobias Koppers 8c31f2a708 fixes for RegExp in schema 2018-09-21 11:04:33 +02:00
Tobias Koppers a91f7366dc fix plugin schemas and give them names 2018-09-21 11:04:26 +02:00
Tobias Koppers 20d9cca01f add tooling to sort schema properties 2018-09-21 11:04:07 +02:00
Kevin Purnelle 6235e99248 feat(IgnorePlugin): allow user to provide his own check functions
The user can provide checkResource and checkContext functions that
will be called with current resource or context respectively.

These functions should return a boolean to decide whether the module
should be ignored or not.

Now the constructor can accept a single option object.

```
const resourceRegExp = /a_regex/
const contextRegExp = /another_regex/

// before:
new webpack.IgnorePlugin(resourceRegExp, contextRegExp)

// alternative:
new webpack.ignorePlugin({resourceRegExp, contextRegExp})
```

Note that from Webpack 5, only passing an object will be allowed,
so we could encourage people to migrate already.
2018-08-14 17:20:10 +02:00