From 79b1075ede80debd556d6c4ad22927333489baab Mon Sep 17 00:00:00 2001 From: Jesse Rosenberger Date: Fri, 9 Jun 2017 19:32:09 +0300 Subject: [PATCH] Remove check for standard-minifier-js@2.1.x from `bundle-visualizer`. While this was helpful in one of the incarnations of the bundle-visualizer during development it isn't relevant anymore since the `.stats.json` will not be present in the bundle unless it was created by a recent version of `standard-minifier-js` which passed in `stats` (no older versions did this). Removing this check will also make it possible for other minifiers to be used with `bundle-visualizer` without them also needing to fork make their own version. --- packages/non-core/bundle-visualizer/server.js | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/packages/non-core/bundle-visualizer/server.js b/packages/non-core/bundle-visualizer/server.js index 2a38b09da2..15a98bcd9a 100644 --- a/packages/non-core/bundle-visualizer/server.js +++ b/packages/non-core/bundle-visualizer/server.js @@ -114,24 +114,9 @@ Meteor.methods({ throw new Meteor.Error("no-stats-bundles", "Unable to retrieve stats"); } - const validStatBundles = statBundles.filter(statBundle => { - if (statBundle && - statBundle.stats && - statBundle.stats.minifier && - statBundle.stats.minifier.name === "standard-minifier-js" && - statBundle.stats.minifier.version.startsWith("2.1.") - ) { - return true; - } - }); - - if (! validStatBundles.length) { - throw new Meteor.Error("no-valid-stats", "No valid stats bundles") - } - return { name: "main", - children: validStatBundles.map((statBundle, index, array) => ({ + children: statBundles.map((statBundle, index, array) => ({ // TODO: If multiple bundles, could // show abbr. bundle names with: // `...${bundle.name.substr(-3)}`,