TheContextModuleFactory module is used by theCompiler to generate dependencies from webpack specificrequire.context API. It resolves the requested directory, generates requests for each file and filters against passed regExp. Matching dependencies then passes throughNormalModuleFactory.
TheContextModuleFactory class extendsTapable and provides the followinglifecycle hooks. They can be tapped the same way as compiler hooks:
ContextModuleFactory.hooks.someHook.tap(/* ... */);As with thecompiler,tapAsync andtapPromise may also be availabledepending on the type of hook.
AsyncSeriesWaterfallHook
Called before resolving the requested directory. The request can be ignored by returningfalse.
dataAsyncSeriesWaterfallHook
Called after the requested directory resolved.
dataSyncWaterfallHook
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.
fileNamesAsyncSeriesWaterfallHook
Called for each file after the request is created but before filtering against regExp.
requestoptions