A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webpack.js.org/api/contextmodulefactory-hooks below:

ContextModuleFactory Hooks | webpack

The ContextModuleFactory module is used by the Compiler to generate dependencies from webpack specific require.context API. It resolves the requested directory, generates requests for each file and filters against passed regExp. Matching dependencies then passes through NormalModuleFactory.

The ContextModuleFactory class extends Tapable and provides the following lifecycle hooks. They can be tapped the same way as compiler hooks:

ContextModuleFactory.hooks.someHook.tap();

As with the compiler, tapAsync and tapPromise may also be available depending on the type of hook.

beforeResolve

AsyncSeriesWaterfallHook

Called before resolving the requested directory. The request can be ignored by returning false.

afterResolve

AsyncSeriesWaterfallHook

Called after the requested directory resolved.

contextModuleFiles

SyncWaterfallHook

Called after directory contents are read. On recursive mode, calls for each sub-directory as well. Callback parameter is an array of all file and folder names in each directory.

alternativeRequests

AsyncSeriesWaterfallHook

Called for each file after the request is created but before filtering against regExp.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4