beauby / jsonapi-datastore

JavaScript client-side JSON API data handling made easy.
MIT License
195 stars 40 forks source link

Error: Uncaught ReferenceError: module is not defined #15

Closed mklocek closed 8 years ago

mklocek commented 8 years ago

Exporting module:

module.exports = {
  JsonApiDataStore: JsonApiDataStore,
  JsonApiDataStoreModel: JsonApiDataStoreModel
};

Not works in non-nodejs and non-browserify environments. There is no need to always use requirejs and stuff like that. I'm suggesting add module existance check. I'm ready to create PR if you agree.

beauby commented 8 years ago

Agreed. It was the case pre-es6 translation. Would love a PR.

Le vendredi 20 novembre 2015, Marcin Klocek notifications@github.com a écrit :

Exporting module:

module.exports = { JsonApiDataStore: JsonApiDataStore, JsonApiDataStoreModel: JsonApiDataStoreModel };

Not works in non-nodejs and non-browserify environments. There is no need to always use requirejs and stuff like that. I'm suggesting add module existance check. I'm ready to create PR if you agree.

— Reply to this email directly or view it on GitHub https://github.com/beauby/jsonapi-datastore/issues/15.

Lucas Hosseini lucas.hosseini@gmail.com