Shopify / js-buy-sdk

The JS Buy SDK is a lightweight library that allows you to build ecommerce into any website. It is based on Shopify's API and provides the ability to retrieve products and collections from your shop, add products to a cart, and checkout.
https://shopify.github.io/js-buy-sdk
MIT License
990 stars 261 forks source link

[1.0alpha-12] Page build with Nuxt failing with shopify-buy sdk. #439

Closed maziarz closed 7 years ago

maziarz commented 7 years ago

I have lately moved a site to Nuxt (VueJS), and after much debugging i have determined that something goes wrong in the build process when shopify-buy is included. I have no clue what is causing this issue, and if its more related to Nuxt build process rather than the SDK. Neverthless i have included a full functional sample and a live demo:

Source: https://github.com/maziarz/nuxt-netlify-test Demo: https://florist-coder-21347.netlify.com/

The shopify-buy SDK resides within the store.js file: https://github.com/maziarz/nuxt-netlify-test/blob/master/store/index.js

maziarz commented 7 years ago

The package was given as a caret version in package.json, therefor it was being updated from alpha to beta automagically, which caused problems with the code. I locked the version to 1.0.0-alpha.10 and everything was spinning correctly agaian.