1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | "use strict";
|
7 |
|
8 |
|
9 |
|
10 | class AddManagedPathsPlugin {
|
11 | |
12 |
|
13 |
|
14 |
|
15 | constructor(managedPaths, immutablePaths) {
|
16 | this.managedPaths = new Set(managedPaths);
|
17 | this.immutablePaths = new Set(immutablePaths);
|
18 | }
|
19 |
|
20 | |
21 |
|
22 |
|
23 |
|
24 |
|
25 | apply(compiler) {
|
26 | for (const managedPath of this.managedPaths) {
|
27 | compiler.managedPaths.add(managedPath);
|
28 | }
|
29 | for (const immutablePath of this.immutablePaths) {
|
30 | compiler.immutablePaths.add(immutablePath);
|
31 | }
|
32 | }
|
33 | }
|
34 |
|
35 | module.exports = AddManagedPathsPlugin;
|