dougmoscrop / serverless-plugin-include-dependencies

MIT License
184 stars 40 forks source link

Adding a way to specify main files for dependencies that don't have a… #7

Closed rkuncewicz closed 7 years ago

rkuncewicz commented 7 years ago

…n index.js or specify main.

What's happening in some libraries is that their structure doesn't conform in a way that resolve can recognize (an example is babel-runtime). They don't have an index.js file or a specified entry 'main' file in their package.json. I've added this so that you can specify an entry point for these kind of libraries if you need to use them.

rkuncewicz commented 7 years ago

Give me a shout if you want a better explanation regarding what's going on, maybe there is a better way to tackle this.

dougmoscrop commented 7 years ago

It makes sense to me, is similar to what has to be done for browserify

On Wed, Jan 18, 2017, 4:57 PM Robert Kuncewicz notifications@github.com wrote:

Give me a shout if you want a better explanation regarding what's going on, maybe there is a better way to tackle this.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dougmoscrop/serverless-plugin-include-dependencies/pull/7#issuecomment-273614697, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjzFExy534Mc51GntbB5wQz6LporALuks5rTorigaJpZM4LncQ6 .

dougmoscrop commented 7 years ago

Thanks for this. I went with a different approach, which was to use resolve-pkg instead. Since the goal of this library is to not have to get in to the whole "inlining of the javascript" (you can use browserify based ones for that), I wanted to keep it zero configuration as much as possible. 1.2.2 should work for your needs, let me know if it doesn't!

rkuncewicz commented 7 years ago

Will do, i'll let you know if we have any issues.