Skip to content
New issue

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

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

Already on GitHub? # to your account

Modifying the output path for serverless is error-prone #12

Closed
blackxored opened this issue Aug 23, 2016 · 3 comments
Closed

Modifying the output path for serverless is error-prone #12

blackxored opened this issue Aug 23, 2016 · 3 comments

Comments

@blackxored
Copy link

blackxored commented Aug 23, 2016

Modifying the output path for serverless service is error-prone and it results in exclude/include options being ignored, effectively setting the service package to only be the result of the webpack compilation. This might be by design or a bug, in either case, prevents us from uploading node_modules to Lambda.

Would love to hear your opinion, but having it break default serverless functionality (as in https://github.com/serverless/serverless/blob/f966424a40417960a7ac4a03c0709eb931c0af2c/docs/understanding-serverless/serverless-yml.md) shouldn't be the path.

@andymac4182
Copy link

What do you want to upload from the node_modules directory to lambda that isn't handled by webpack?

@blackxored
Copy link
Author

As I mentioned, it breaks exclude/include from serverless, as it modifies the artifact.
I'm having some node deps that can't/shouldn't be bundled specified as prod deps so I need to upload those, e.g. node-fetch, babel-runtime, ...

@thenikso
Copy link
Contributor

I think @blackxored is absolutely right, changing the service path stank from the first time.

One solution could be #16 where you add npm packages to the package.

Of course we need to put the webpack bundle somewhere and pack it instead of the local content. So either we produce the artifact ourself or we make the default zipper point to the folder with our bundle (which is what we are doing now).

I'm open to suggestions

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

No branches or pull requests

3 participants