Sam Hulick
12/17/2021, 9:39 PM.sst/artifacts/<hash>
folder? so for example.. I have a single Lambda handler right now, and that shows up in that folder as src/lambda.js
. I’ve run a separate build process before running yarn start
, and I want to have those resulting files copied into the same folder as the lambda.js
file. is that doable?thdxr
12/17/2021, 9:40 PMSam Hulick
12/17/2021, 9:41 PMSam Hulick
12/17/2021, 9:44 PMbundle
recently? there are hooks!Sam Hulick
12/17/2021, 9:47 PMconst api = new sst.Api(this, "Api", {
routes: {
$default: new sst.Function(this, "TestFunc", {
handler: "src/lambda.handler",
bundle: {
copyFiles: [{ from: "dist", to: "." }],
},
}),
},
});
Sam Hulick
12/17/2021, 9:52 PMsst start
?Sam Hulick
12/17/2021, 10:02 PMbeforeBundling(inputDir, outputDir) {
console.log("before:", inputDir, outputDir);
return [
`yarn vite build --outDir ${outputDir} && ` +
`yarn vite build --ssr --outDir ${outputDir}`,
];
},
it’s probably not a great idea to use yarn
.. not sure of the proper way to run node_modules/.bin/vite
Sam Hulick
12/17/2021, 10:04 PMecho hello
🤔thdxr
12/17/2021, 10:17 PMSam Hulick
12/17/2021, 10:18 PMyarn build:vite
separatelyFrank
sst start
modeSam Hulick
12/18/2021, 10:58 PMSam Hulick
12/18/2021, 10:58 PM