project/ ├─ frontend/ │ ├─ deno.json │ ├─ src/ │ │ ├─ routes/ │ │ │ ├─ +page.svelte │ │ │ ├─ sample.ts │ ├─ package.json ├─ backend/ │ ├─ main.ts │ ├─ deno.json ├─ deno.json
{ "workspace": ["./frontend", "./backend"] }
export function sayHi() { console.log("Hi"); }
{ name: "@scope/backend", version: "0.0.1" }
<script lang="ts"> import { sayHi } from "@scope/backend"; </script>
+page.svelte
'sayHi' is declared but its value is never read. Cannot find module '@scope/backend' or its corresponding type declarations.
sample.ts
import { sayHi } from "@scope/backend"; // This imports correctly
.svelte