Is there any way to specify additional files to in...
# sst
t
Is there any way to specify additional files to include when deploying? I need to make sure that
node_modules/.prisma
is zipped up
f
Jay knows this better. @Jay what do u think?
j
Right now the best way would be to turn bundle off and set the srcPath to the dir that needs to be zipped. There are some limitations to this, it doesn’t zip up the entire app, only sub dirs. Where is this node modules dir?
t
Unfortunately it's in the root and I'm running into that constraint of not having srcPath in the root while bundle is off
I can restructure the folders to try and make it work but was wondering if there was a good idea to fix that constraint, maybe by putting the
.build
folder in a tmp folder outside the project?
Using
srcPath
and disable bundling makes the result massive - I don't need everything in node_modules just a few things
Would there maybe be a way to specify in the function config other paths to copy before zipping?
j
Yeah we'll need to add this
Let me talk to @Frank about it
f
@thdxr I’m going to look at this soon. Do you want the
node_modules/.prisma
copied to
node_modules/.prisma
in the Lambda zip? Or does it just go to
.prisma
?
I’m not too familiar with prisma. Is
.primsa
a standalone generated directory that can just be copied over?
t
Yeah it's a standalone generated directory that needs to be shipped alongside the built function code, it contains some binaries needed for production
I hacked it in by modifying resources/util/builder to copy dirs over before zipping and it seems to work but need to verify
j
Ah, if you works, share the snippet 😉 We'll figure out how to make it an option.
t
Here's what I came up with as a suggestion: https://github.com/serverless-stack/serverless-stack/pull/205
j
Awesome! Thank you for the PR. We'll take a look soon! @Frank