1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.default = _default;
|
7 |
|
8 | var _tapable = require("tapable");
|
9 |
|
10 | const relayCompilerPluginHooksMap = new WeakMap();
|
11 |
|
12 | function createRelayCompilerPluginHooks() {
|
13 | return {
|
14 | beforeWrite: new _tapable.AsyncSeriesWaterfallHook(['pluginArgs']),
|
15 | afterWrite: new _tapable.AsyncSeriesWaterfallHook(['pluginArgs'])
|
16 | };
|
17 | }
|
18 |
|
19 | function _default(compilation) {
|
20 | let hooks = relayCompilerPluginHooksMap.get(compilation);
|
21 |
|
22 | if (!hooks) {
|
23 | hooks = createRelayCompilerPluginHooks();
|
24 | relayCompilerPluginHooksMap.set(compilation, hooks);
|
25 | }
|
26 |
|
27 | return hooks;
|
28 | } |
\ | No newline at end of file |