Carlos Ribeiro
07/12/2021, 8:55 AMbundle: {
copyFiles: [{
from: `src/config/`,
to: `src/config/`
}]
}Brinsley
07/12/2021, 9:05 AMcopyFiles is in nodeBuilder, which doesn’t get called when running locally. Anyone found a solution for this?thdxr
07/12/2021, 2:11 PMthdxr
07/12/2021, 2:12 PMjson directly and will bundle it so you shouldn't need to do anything special afaikthdxr
07/12/2021, 2:12 PMthdxr
07/12/2021, 2:13 PMBrinsley
07/13/2021, 6:47 AMstage named folder. The copyFiles operation drops the config files for the current stage in to the parent folder so we don’t end up with all of the stage configs in the deployed output.Brinsley
07/13/2021, 7:19 AM<project-root>/.build/src/path/to/<stage>/config.jsonBrinsley
07/13/2021, 7:20 AM.build/src doesn’t contain the config files 😞Frank
copyFiles to bundle a json config file with the Lambda function. https://github.com/fwang/sst-copy-files-testFrank
sst start, the json config is not copied b/c it exists locally. And on sst deploy the json config gets copied to the same location as local.Frank
Brinsley
07/13/2021, 12:47 PMBrinsley
07/13/2021, 12:47 PMBrinsley
07/13/2021, 1:16 PMpath.resolve with __dirname to grab the config location - this was what was killing it. Using the path relative to the root of the project saw it fixed. Appreciate the effort on this mate!Frank