gund / ng-http-interceptor

Http Interceptor library for Angular
MIT License
104 stars 16 forks source link

main in package.json should point to umd bundle #128

Closed Necroskillz closed 7 years ago

Necroskillz commented 7 years ago

See how it is in angular: https://github.com/angular/angular/blob/master/modules/%40angular/core/package.json

main in package.json should point to the bundle, while new property module should point to es6 style index.js.

gund commented 7 years ago

Hey thanks for pointing this out, will update package.json accordingly

gund commented 7 years ago

BTW: Do you know if this change may bring potential breaking change in behavior or bundling process?

Necroskillz commented 7 years ago

I know it breaks with some tools as it is now :P (for example karma-typescript. But it should be like that since angular also has it like that.

gund commented 7 years ago

Yeah, so this change can be included only in version 3 which is in beta now, until angular 4 itself will come out from beta =)

Necroskillz commented 7 years ago

Not sure if u understood: currently the main pointing to es6 module does not work with karma-typescript (while main pointing to umd bundle and module pointing to es6 module does). It also works with webpack and rollup. I think this can be done sooner.

gund commented 7 years ago

Oh you mean it is breaking in current configuration with karma-typescript? I thought it might break if I will change config as you suggested =) So it is safe to update config without breaking change?

Necroskillz commented 7 years ago

As far as I know it should be safe. Not 100% sure.

I'm switching to karma-webpack now because karma-typescript also has some other issues. So I'm not in a hurry for this.

gund commented 7 years ago

Okay, then I will locally update config and try on test webpack project to check if basic usage won't break and then release as a fix. Otherwise it will be a breaking change.

Will update here here soon.

gund commented 7 years ago

Well I tried locally to use lib with updated package.json and seems like it is working just fine so I will release and update soon.