Module or jsnext:main in package.json
Since this is a Typescript app, can you distribute es5 code (es5 target) with es2015 modules in addition to the commonjs modules you distribute?
Set the moduleResolution to node as well to make everything work well.
jsnext:main and module are the fields that point to the entrypoint for the es5 code with es2015 modules. Angular uses module and it seems most bundlers look for module, then jsnext:main, then main in that order.
Happy to help with the process if needed.
Thanks, Dan
Open to pull requests :-)
Sorry, no time to help. I submitted this same issue to about 20 popular Angular 2 plugins.
I'll make some docs to make it easy. Right now your lib is not tree shakable and ships commonjs code instead of ES2015 code. Not the end of the world but not optimal either.
Thanks, Dan
@nraboy I will take a look on that for you when I have a time and open a PR. This will let the lib organized and better to use with a single endpoint with all the es2015 compiled.
@nraboy I think @stalniy already did that on hist fork, am I right?
He did a great job BTW 👍 👏
Frankly speaking I haven't done this just because we are still on Angular rc.4 . In this week I plan to upgrade Angular and will probably do some stuff on this library as well