beauby / jsonapi-datastore

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

ES6 import with Browserify #5

Closed mwpastore closed 8 years ago

mwpastore commented 8 years ago

I'm having a heck of a time trying to import jsonapi-datastore into my Ember application using Browserify. Can someone help me with the syntax? new JsonApiDataStore() yields the following when I try:

import { JsonApiDataStore } from 'npm:jsonapi-datastore';

Gives me npm_jsonapi_datastore.JsonApiDataStore is not a function, and:

import JsonApiDataStore from 'npm:jsonapi-datastore';

Gives me JsonApiDataStore.default is not a function, and:

import * as JsonApiDataStore from 'npm:jsonapi-datastore';

Gives me JsonApiDataStore is not a function.

Thanks in advance for any suggestions...

beauby commented 8 years ago

Hi @mwpastore, the situation should become much easier once #4 gets merged (which will be really soon).

mwpastore commented 8 years ago

Great! Thank you!

beauby commented 8 years ago

@mwpastore This should be fixed now that #4 has been merged. Could you confirm?

krainboltgreene commented 8 years ago

Nevermind!

The top version works.

beauby commented 8 years ago

Glad to hear that! May I close the issue?

krainboltgreene commented 8 years ago

Yes! Well at least for me.

beauby commented 8 years ago

Great, closing then, feel free to reopen if needed.