dougmoscrop / serverless-plugin-include-dependencies

MIT License
184 stars 41 forks source link

This plugin doesn't work when there's alternative main entry specified in package.json #61

Open neoromantic opened 3 years ago

neoromantic commented 3 years ago

Consider package.json:

{
  "name": "cloud",
  "version": "0.1.0",
  "description": "",
  "main": "app.js"
}

Serverless allows you to specify something else than 'index.js' to be entry file to function handlers.

In this case include-dependencies plugin fails, due to this code: https://github.com/dougmoscrop/serverless-plugin-include-dependencies/blob/b174cd62415feaefc3e8a0f58c344c21ffd6e277/include-dependencies.js#L138, which supposes 'index' to be a default filename.