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: src/content/api/contextmodulefactory-hooks.md
+19-17Lines changed: 19 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -4,48 +4,50 @@ group: Plugins
4
4
sort: 11
5
5
contributors:
6
6
- iguessitsokay
7
+
translators:
8
+
- KimYangOfCat
7
9
---
8
10
9
-
The `ContextModuleFactory` module is used by the `Compiler` to generate dependencies from webpack specific[require.context](/api/module-methods/#requirecontext) API. It resolves the requested directory, generates requests for each file and filters against passed regExp. Matching dependencies then passes through [NormalModuleFactory](/api/normalmodulefactory-hooks).
As with the `compiler`, `tapAsync`and`tapPromise`may also be available
19
-
depending on the type of hook.
20
+
与 `compiler` 一样,`tapAsync`和`tapPromise`是否可用
21
+
取决于钩子的类型。
20
22
21
-
### beforeResolve
23
+
### beforeResolve {#beforeresolve}
22
24
23
25
`AsyncSeriesWaterfallHook`
24
26
25
-
Called before resolving the requested directory. The request can be ignored by returning `false`.
27
+
在解析请求的目录之前调用。请求可以通过返回 `false` 来忽略。
26
28
27
-
-Callback Parameters: `data`
29
+
-回调参数:`data`
28
30
29
-
### afterResolve
31
+
### afterResolve {#afterresolve}
30
32
31
33
`AsyncSeriesWaterfallHook`
32
34
33
-
Called after the requested directory resolved.
35
+
在请求的目录解析后调用。
34
36
35
-
-Callback Parameters: `data`
37
+
-回调参数:`data`
36
38
37
-
### contextModuleFiles
39
+
### contextModuleFiles {#contextmodulefiles}
38
40
39
41
`SyncWaterfallHook`
40
42
41
-
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.
0 commit comments