brandlabs / bigcommerce-sitewide-banners

Sitewide banners on your BigCommerce store theme
MIT License
1 stars 2 forks source link

error on export #6

Open hognogi opened 6 years ago

hognogi commented 6 years ago

I think it's caused by the combination of using es6 import but commonjs export.

My browser gives me this error:

https://i.imgur.com/JvfniYH.png

In order to use the plugin, I need to edit this line in my node_modules folder.

https://github.com/brandlabs/bigcommerce-sitewide-banners/blob/8fbace73ab7af25a202b78a1e69128f821b30c0f/src/sitewide-banners.js#L42

hognogi commented 6 years ago

I recommend simply updating the line to export in es6 style:

export default class SiteWideBanners {

carsonreinke commented 6 years ago

@hognogi This was actually wrong, there is a missing part in the README to note to add a WebPack alias to use the es5 version.

carsonreinke commented 6 years ago

@hognogi Actually, this should be updated, so I am leaving this open.

hectorfhurtado commented 6 years ago

@hognogi, @carsonreinke that note is already on the READM here