mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
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.
This commit is contained in:
@@ -114,24 +114,9 @@ Meteor.methods({
|
|||||||
throw new Meteor.Error("no-stats-bundles", "Unable to retrieve stats");
|
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 {
|
return {
|
||||||
name: "main",
|
name: "main",
|
||||||
children: validStatBundles.map((statBundle, index, array) => ({
|
children: statBundles.map((statBundle, index, array) => ({
|
||||||
// TODO: If multiple bundles, could
|
// TODO: If multiple bundles, could
|
||||||
// show abbr. bundle names with:
|
// show abbr. bundle names with:
|
||||||
// `...${bundle.name.substr(-3)}`,
|
// `...${bundle.name.substr(-3)}`,
|
||||||
|
|||||||
Reference in New Issue
Block a user