gdg-tangier / vue-firestore

:cloud: Cloud Firestore binding in realtime with Vuejs
MIT License
235 stars 28 forks source link

"Define is not defined" #3

Closed jordanfokoua closed 6 years ago

jordanfokoua commented 6 years ago

I've installed your module and i get the following error "Define is not defined" capture

dylantientcheu commented 6 years ago

I had the same issue when using npm install, this must be due to javascript closures, To correct this, you can simply change the first line of the vue-firestore.js file in node_modules/vue-firestore/dist to this:

(function(define) {define("Vue-firestore", [], function() { return /******/ (function(modules) { // webpackBootstrap

// Do not forget to close the parenthesis
amranidev commented 6 years ago

HI, Thanks for opening this issue, do you use CommonJS via Browsify or webpack ?, It's recommended to use webpack with ES6.

dylantientcheu commented 6 years ago

I used webpack with electron-vuetify.

amranidev commented 6 years ago

A'right, I'm going to change the library target to UMD. Could you please try v0.1.4 now?

jordanfokoua commented 6 years ago

@amranidev I am making use of a webpack and electron-vuetify

jordanfokoua commented 6 years ago

@blurdylan you got the solution to the problem. The vue-firestore.js file had an issue with the define function. Thanks for your support