Is there a way to ensure certain files that aren't in the app tree make it into the @svelte.dev Kit build output? I have a background process that pulls a file from a relative import. Works fine in dev. Can't find the file in prod :/
Post
You can probably use the `read` function depending on how you are reading the file svelte.dev/docs/kit/$ap... Another option would be to manually copy the file after the build
svelte.dev$app/server • SvelteKit Docs$app/server • SvelteKit documentation
If, however, i import the js export and register it with node-cron, it will exist in the AST at build time, and be brought over. The issue is that the file structure changes between Dev and build times such that node-cron cannot locate the file to import.
0 reposts0 likes