-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[sam build/Feature] Turn off use of temp directory, allow to build in current folder #2655
Comments
I think this might also solve some issues with sam and multi-module maven projects. |
I just figured out that it's using a temp folder, and it also copies all the node_modules folder for each (!) function. |
We have a roadmap here, and we also try to take in popular feature requests based on 👍🏽 from the community. You can check the roadmap to see if your proposal has been prioritized for implementation. |
hope this feature is added soon 😄 Here are my reasons:
|
without this SAM is almost unusable in node lambdas |
Our SAM project uses Typescript, and while the custom build feature has made Typescript compilation possible, having the option for an in-place build rather than copying would alleviate several pain points for us:
|
Closing so that we can track in the above issue ( |
|
Have a flag to turn off the use of the temp directory when building. Basically the idea is to be able to use the current src path.
The temp directory doesnt work for situations like nodejs monorepos or common dependencies between projects.
Since once on folder is copied to this temp folder, it will loose all context.
So, ideally it would be to run the build in the same src folder.
For example, for people using webpack, coping everything to a temp dir, installing, etc, is a waste of time.
My case:
We have a nodejs monorepo project with 20 lambdas. obviously we cant use common dependencies just like that, because of this temp dir. We also use webpack, so doing all of that is a waste of time.
we dont need sam build to copy and install for us.
one normally would run
yarn
ornpm install
on its own at the beginning.And then we need a way to tell sam build what to copy to the artifacts dir. Using gitignore or npmignore is not appropriately here.
It would be awesome to have a samconfig that we could say what to include or exclude, maybe as a way of overriding defaults.
thanks
this feature would fix issues like these and probably others:
#2064
#2077
The text was updated successfully, but these errors were encountered: