devour-client icon indicating copy to clipboard operation
devour-client copied to clipboard

JSPM only works with import 'devour-client/lib'

Open dvtoever opened this issue 9 years ago • 2 comments

I just started a JSPM angular 2 project (according to this project).

Installing devour client: jspm install npm:devour-client works. When I need it in a component it only works when I use import JsonApi from 'devour-client/lib';

Am I missing something or is there something wrong regarding the packaging of this module?

dvtoever avatar Jun 30 '16 13:06 dvtoever

Hmmm... somehow this is the first time I've ever heard of JSPM?

We probably need to look into how we publish this module a little deeper - looking at our package.json file, I wonder if I've been publishing this the wrong way?

Emerson avatar Jul 01 '16 16:07 Emerson

I found this blog explaining how a library should be structured as CommonJS so it can be used in SystemJS based applications like angular2. I think the section "Creating the public API of a library" explains what is missing in the devour project.

dvtoever avatar Jul 07 '16 08:07 dvtoever