Deno Workspace Not Functioning in .svelte Files
Description
I am using Deno's monorepo feature to share modules between the backend and frontend of my project. I’ve set up the following directory structure (omitting some files for brevity):
The files are as follows (details simplified for clarity, as they are not the main issue):
project/deno.json
backend/main.ts
backend/deno.json
frontend/src/routes/+page.svelte
However, when importing in the
+page.svelte
file, I encounter an issue, and the following error messages are displayed:
Interestingly, when I create a sample.ts
file in the same directory, the module is imported without any issues:
frontend/src/routes/sample.ts
How can I correctly import modules within .svelte
files?1 Reply
I realized after sending this that SvelteKit projects inherently depend on Node.js, so it might not be possible to resolve this issue purely with Deno. I acknowledge that I might not fully understand the intricacies of how these tools interact in this context.