claudioc
03/16/2021, 2:03 PMimport sql from './sql/seed.sql'
// Do something with the sql (which is just a string)
That’s a pretty easy setup (I can share it)Dmitry Pavluk
03/16/2021, 2:27 PMDmitry Pavluk
03/16/2021, 2:28 PMclaudioc
03/16/2021, 2:29 PMreturn new sst.Api(this, 'Api', {
defaultFunctionProps: {
bundle: {
loader: {
'.html': 'text',
'.css': 'text'
}
},
},
routes: { ...
Dmitry Pavluk
03/16/2021, 4:59 PMfile
esBuild loader to grab them.Dmitry Pavluk
03/16/2021, 5:00 PM.build
folder to be referenceable. They're loaded via fs.readFileSync
. The copyFiles
option would be a lot more conducive to our use case.Dennis Dang
03/25/2021, 9:32 PMcopyFiles: [{ from: "src/db", to: "/src/db" }]
The file structure of the built files vs the development files are a few layers different. But I used a variable flag to change the path resolution accordingly.