Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
neoromantic opened this issue Feb 25, 2021 · 0 comments

Comments

@neoromantic
Copy link

neoromantic commented Feb 25, 2021

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:

const handlerPath = lastDotIndex !== -1 ? handler.slice(0, lastDotIndex) : 'index';
, which supposes 'index' to be a default filename.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant