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
Currently, I'm getting around this issue by registering the js module, rather than the file location. This doesn't support background processes, but it's a decent stop gap. I don't think node is the right place for background tasks anyway. But off the main process would be ideal.
0 reposts0 likes