Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

fix(web main): avoid exceeding the call stack size #149

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@criticalmanufacturing/dev-tasks",
"version": "9.0.4-1",
"version": "9.1.0-0",
"description": "Gulp tasks and helpers for development",
"main": "main.js",
"dependencies": {
Expand Down
4 changes: 3 additions & 1 deletion web.main.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ module.exports = function (gulpWrapper, ctx) {
}
return files;
}, []);
return Array.prototype.concat(...files);
return files.reduce((acc, val) => acc.concat(val), []);
}

/**
Expand Down Expand Up @@ -349,7 +349,9 @@ module.exports = function (gulpWrapper, ctx) {
}

let bundlesFiles = getFiles(path.join(ctx.baseDir, 'bundles'), includeRegex, excludeRegex, 1);
pluginUtil.log(`Number files in bundles folder: ${bundlesFiles.length}`);
let nodeFiles = getFiles(path.join(ctx.baseDir, 'node_modules'), includeRegex, excludeRegex, 1);
pluginUtil.log(`Number files in node_modules folder: ${nodeFiles.length}`);

let compressedFilesCount = 0;
let parallelCompressFiles = (filepaths) => {
Expand Down