Skip to content

Releases: TinyboxSoftware/Smolcart.js

Fix: reduce bundle size + fix a few bugs

13 Dec 20:48
Compare
Choose a tag to compare

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.

Basic Functionality

13 Nov 09:36
00ee79b
Compare
Choose a tag to compare
Basic Functionality Pre-release
Pre-release

Basic Functionality

This release marks a functional, but barely, version of smolcart.js.
If you're going to use this, please be aware that this is not meant to be stable or production-ready! the API will be changing quite a bit!

This version introduces the following features:

  1. UMD Modules for the Browser: use smolcart.js as a UMD and link through a script tag in your templates.
  2. Add Items to Cart: use smolcart.js to add items to your Shopify cart.
  3. Modify Items in Cart: use smolcart.js to modify and remove items in your Shopify cart.
  4. Clear the Cart: use smolcart.js to completely clear the cart.
  5. Get Cart Data: use smolcart.js to get cart data when you need it.