When bundling with webpack, the /schemas directory tends to get left behind. Depending on the bundle, there's no easy way to include those files in the build every time because they're being loaded via fs. This is especially tricky on a serverless environment (AWS, etc).
Alternatives to the current method could include making those files actual ts or js files and using await import to dynamically import the schema that's needed.
When bundling with webpack, the
/schemas
directory tends to get left behind. Depending on the bundle, there's no easy way to include those files in the build every time because they're being loaded viafs
. This is especially tricky on a serverless environment (AWS, etc).Alternatives to the current method could include making those files actual ts or js files and using
await import
to dynamically import the schema that's needed.