Skip to content

Commit

Permalink
[INTERNAL] Bundle generators: Adapt to latest ReaderFilter changes
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomByte committed Dec 2, 2021
1 parent 1a5cf5e commit be2833f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 22 deletions.
13 changes: 5 additions & 8 deletions lib/tasks/bundlers/generateBundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,11 @@ module.exports = function({
});

if (taskUtil) {
combo = combo.filter({
resourceTagCollection: taskUtil.getResourceTagCollection(),
matchMode: "none",
filters: [{
tag: bundleOptions.optimize ? // Omit -dbg files for optimize bundles and vice versa
taskUtil.STANDARD_TAGS.IsDebugVariant : taskUtil.STANDARD_TAGS.HasDebugVariant,
value: true
}]
// Omit -dbg files for optimize bundles and vice versa
const filterTag = bundleOptions.optimize ?
taskUtil.STANDARD_TAGS.IsDebugVariant : taskUtil.STANDARD_TAGS.HasDebugVariant;
combo = combo.filter(function(resource) {
return !taskUtil.getTag(resource, filterTag);
});
}

Expand Down
10 changes: 3 additions & 7 deletions lib/tasks/bundlers/generateComponentPreload.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,9 @@ module.exports = function({
});

if (taskUtil) {
combo = combo.filter({
resourceTagCollection: taskUtil.getResourceTagCollection(),
matchMode: "none",
filters: [{
tag: taskUtil.STANDARD_TAGS.IsDebugVariant,
value: true,
}]
combo = combo.filter(function(resource) {
// Remove any debug variants
return !taskUtil.getTag(resource, taskUtil.STANDARD_TAGS.IsDebugVariant);
});
}

Expand Down
10 changes: 3 additions & 7 deletions lib/tasks/bundlers/generateLibraryPreload.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,13 +278,9 @@ module.exports = function({workspace, dependencies, taskUtil, options: {projectN
});

if (taskUtil) {
combo = combo.filter({
resourceTagCollection: taskUtil.getResourceTagCollection(),
matchMode: "none",
filters: [{
tag: taskUtil.STANDARD_TAGS.IsDebugVariant,
value: true
}]
combo = combo.filter(function(resource) {
// Remove any debug variants
return !taskUtil.getTag(resource, taskUtil.STANDARD_TAGS.IsDebugVariant);
});
}

Expand Down

0 comments on commit be2833f

Please sign in to comment.