Last change
on this file since 76712b2 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
1.3 KB
|
Line | |
---|
1 | "use strict";
|
---|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
---|
3 | exports.ChunkIncludeExcludeTester = void 0;
|
---|
4 | var ChunkIncludeExcludeTester = /** @class */ (function () {
|
---|
5 | function ChunkIncludeExcludeTester(includeExcludeTest) {
|
---|
6 | this.includeExcludeTest = includeExcludeTest;
|
---|
7 | }
|
---|
8 | ChunkIncludeExcludeTester.prototype.isIncluded = function (chunkName) {
|
---|
9 | if (typeof this.includeExcludeTest === 'function') {
|
---|
10 | return this.includeExcludeTest(chunkName);
|
---|
11 | }
|
---|
12 | // only include
|
---|
13 | if (this.includeExcludeTest.include && !this.includeExcludeTest.exclude) {
|
---|
14 | return this.includeExcludeTest.include.indexOf(chunkName) > -1;
|
---|
15 | }
|
---|
16 | // only exclude
|
---|
17 | if (this.includeExcludeTest.exclude && !this.includeExcludeTest.include) {
|
---|
18 | // included as long as it's not excluded
|
---|
19 | return !(this.includeExcludeTest.exclude.indexOf(chunkName) > -1);
|
---|
20 | }
|
---|
21 | // include and exclude together
|
---|
22 | if (this.includeExcludeTest.include && this.includeExcludeTest.exclude) {
|
---|
23 | return (!(this.includeExcludeTest.exclude.indexOf(chunkName) > -1) &&
|
---|
24 | this.includeExcludeTest.include.indexOf(chunkName) > -1);
|
---|
25 | }
|
---|
26 | return true;
|
---|
27 | };
|
---|
28 | return ChunkIncludeExcludeTester;
|
---|
29 | }());
|
---|
30 | exports.ChunkIncludeExcludeTester = ChunkIncludeExcludeTester;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.