Interface: HookFilter
Defined in: plugin/hook-filter.ts:22
Properties
code?
- Type:
optionalcode:GeneralHookFilter<StringOrRegExp>
Defined in: plugin/hook-filter.ts:57
id?
- Type:
optionalid:GeneralHookFilter<StringOrRegExp>
Defined in: plugin/hook-filter.ts:55
This filter is used to do a pre-test to determine whether the hook should be called.
Examples
Include all ids that contain node_modules in the path.
js
{ id: '**'+'/node_modules/**' }Include all ids that contain node_modules or src in the path.
js
{ id: ['**'+'/node_modules/**', '**'+'/src/**'] }Include all ids that start with http
js
{ id: /^http/ }Exclude all ids that contain node_modules in the path.
js
{ id: { exclude: '**'+'/node_modules/**' } }Formal pattern to define includes and excludes.
{ id : {
include: ['**'+'/foo/**', /bar/],
exclude: ['**'+'/baz/**', /qux/]
}}moduleType?
- Type:
optionalmoduleType:ModuleTypeFilter
Defined in: plugin/hook-filter.ts:56