Skip to content

Fix: reduce bundle size + fix a few bugs

Pre-release
Pre-release
Compare
Choose a tag to compare
@MykalMachon MykalMachon released this 13 Dec 20:48

Summary of Release

Here's a summary of the changes in this release.
The release can be accessed through NPM, UNPKG, or downloaded below for independent hosting.

Reducing Bundle Size

While there were a few bug fixes in this release, the biggest change comes in the bundle size. It was reduced from ~5.5kb minified, to ~3.1kb minified. which is just over a 40% reduction in size.

This was achieved by setting our build target to "es2017" instead of "es5" which reduced build size thanks to not having to support older browsers. Since Polyfill.io utils are included in Smolcart.js it was determined this was acceptable.

Bugfixes

Here are the bug fixes included in this release

  1. Can now remove an item from the cart using Smolcart.modifyItems({id: '1234', quantity: 0})
  2. all fetch requests now use an absolute URL for requests solving some issues on Firefox/Edge.