BinarCode / vue-notifyjs

Minimalist 1kb Notification component
MIT License
170 stars 28 forks source link

Failed to register component after updating to v0.4.3 #27

Open sreecodeslayer opened 6 years ago

sreecodeslayer commented 6 years ago

The latest version rolled out seems to have an issue registering the component, as mentioned in the setup doc

index.js:57 Uncaught TypeError: Cannot use 'in' operator to search for 'default' in undefined
    at index.js:57
    at vue-notifyjs.min.js:6
    at vue-notifyjs.min.js:6
Unknown custom element: <notifications> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
cristijora commented 6 years ago

@sreecodeslayer Do you mind sharing the code for plugin installation? Personally, updated in 2 apps and didn't encounter such issues

bum commented 6 years ago

your demo on jsfiddle does not run instead

sreecodeslayer commented 6 years ago

The plugin is imported directly from CDN, and then

Vue.use(vueNotifyjs);

and in the base template,

<notifications></notifications>

This works on pre-0.4.3 , and once the unpkg min version changed, the notifications are broken.

Also, you example section, jsFiddle demo and the usage mentioned in Readme, all have different import statement.

Which would be the current and updated usage ?

cristijora commented 6 years ago

@bum @sreecodeslayer indeed it doesn't work from cdn. Will fix that and release a new version. Apologies

cristijora commented 6 years ago

@sreecodeslayer the usage (when using npm package(not cdn) is the one from readme) CDN usage would be the one from jsfiddle