andrew-templeton / cfn-lambda

CloudFormation custom resource helper for Lambda Node.js runtime
MIT License
82 stars 22 forks source link

make requires webpackable #30

Closed odedniv closed 6 years ago

odedniv commented 6 years ago

It's common to webpack functions to use dependencies and keep minimal sized zips. This PR allows it (though webpack still shows warnings).

andrew-templeton commented 6 years ago

What's your use case here?

Doesn't this break Windows users by making the path delimiter always set as /?

odedniv commented 6 years ago

I believe that's the way require works in node, and it should work on Windows.

We use webpack before deploying or functions to include dependencies. Are you familiar with webpack?

andrew-templeton commented 6 years ago

This kind of thing is my concern: https://stackoverflow.com/questions/34329149/nodejs-absolute-paths-in-windows-with-forward-slash

odedniv commented 6 years ago

Forward slash is only a problem if you user absolute paths, for relative paths it should work cross platform as far as I can tell.

But how would cfn lambda be used on Windows? Lambda is Linux only

odedniv commented 6 years ago

Actually .\ doesn't (or didn't) seem to work on Windows, ./ however does: https://github.com/nodejs/node/issues/6049

andrew-templeton commented 6 years ago

Tired this week, lots of work - thanks for contributing. Cutting release with this in it. (2.1.3)