Skip to content

Conversation

@bartveneman
Copy link
Member

@bartveneman bartveneman commented Feb 18, 2024

before

       1891 B: format.cjs.gz
       1699 B: format.cjs.br
       1303 B: format.modern.js.gz
       1199 B: format.modern.js.br
       1864 B: format.module.js.gz
       1666 B: format.module.js.br
       1940 B: format.umd.js.gz
       1748 B: format.umd.js.br

 4294  format.cjs
18306  format.cjs.map
 3142  format.modern.js
17615  format.modern.js.map
 4203  format.module.js
18312  format.module.js.map
 4500  format.umd.js
18309  format.umd.js.map
  762  index.d.ts

after

       1411 B: format.cjs.gz
       1282 B: format.cjs.br
       1359 B: format.modern.js.gz
       1240 B: format.modern.js.br
       1375 B: format.module.js.gz
       1258 B: format.module.js.br
       1485 B: format.umd.js.gz
       1354 B: format.umd.js.br

  3369  format.cjs
 19815  format.cjs.map
  3217  format.modern.js
 19796  format.modern.js.map
  3282  format.module.js
 19827  format.module.js.map
  3575  format.umd.js
 19818  format.umd.js.map
   762  index.d.ts

the 1kB size decrease is because we're no longer using for-loops which caused the inclusion of this huge polyfill:

function r(e, r) {
  (null == r || r > e.length) && (r = e.length);
  for (var t = 0, n = new Array(r); t < r; t++) n[t] = e[t];
  return n;
}
function t(e, t) {
  var n =
    ("undefined" != typeof Symbol && e[Symbol.iterator]) || e["@@iterator"];
  if (n) return (n = n.call(e)).next.bind(n);
  if (
    Array.isArray(e) ||
    (n = (function (e, t) {
      if (e) {
        if ("string" == typeof e) return r(e, t);
        var n = Object.prototype.toString.call(e).slice(8, -1);
        return (
          "Object" === n && e.constructor && (n = e.constructor.name),
          "Map" === n || "Set" === n
            ? Array.from(e)
            : "Arguments" === n ||
              /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)
            ? r(e, t)
            : void 0
        );
      }
    })(e)) ||
    (t && e && "number" == typeof e.length)
  ) {
    n && (e = n);
    var a = 0;
    return function () {
      return a >= e.length ? { done: !0 } : { done: !1, value: e[a++] };
    };
  }
  throw new TypeError(
    "Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
  );
}

@bartveneman bartveneman changed the title fix minified spaces fix minified spaces and slice bundle size Feb 18, 2024
@bartveneman bartveneman merged commit 7248d98 into main Feb 18, 2024
@bartveneman bartveneman deleted the minify-stuff branch February 18, 2024 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

List item spacing not minified

1 participant