Is it good practice to add .serverless/ and .serverless_nextjs/ to .gitignore?
My repo is getting cluttered with templates and and output function code that I'd rather keep out.
I've tried adding .serverless_nextjs/ to gitignore and this seems fine. The dir gets recreated on build and the deploy works.
However, ignoring .serverless/ files seem to cause my app to deploy to a brand new aws lambda function after removing the dir and rebuilding. There must be something in that directory that is holding a reference to the existing lambdas.
I wonder what the workflow would look like if I were to switch laptops and continue coding on another machine. I guess the .serverless dir must exist in order to deploy to the correct lambda.
Has anyone else dealt with this? I'm interested.
I think https://github.com/danielcondemarin/serverless-next.js/tree/master/packages/serverless-nextjs-component#cicd-a-new-cloudfront-distribution-is-created-on-every-ci-build-i-wasnt-expecting-that should answer your question
@claygorman is right, the FAQ has the answer 馃檪
Cheers!
Most helpful comment
I think https://github.com/danielcondemarin/serverless-next.js/tree/master/packages/serverless-nextjs-component#cicd-a-new-cloudfront-distribution-is-created-on-every-ci-build-i-wasnt-expecting-that should answer your question