Rouffy
[Svelte + Vite + Deno 2.0] Svelte and Vite configuration without a package.json
- Create a
svelte.config.ts
in Test Svelte
folder with the following contents :
- Create a tsconfig.json
in Test Svelte
folder with the following contents :
- Create a vite.config.ts
in Test Svelte
folder with the following contents :
- Create a src
folder in Test Svelte
- Create a main.ts
in src
folder with the following contents :
- Create a App.svelte
in src
folder with the following contents :
The directory should look as follows :
TestSvelte
├── deno.json
├── deno.lock
├── index.html
├── src
│ ├── App.svelte
│ └── main.ts
├── svelte.config.ts
├── tsconfig.json
└── vite.config.ts
- Run the project with deno run dev
. When going on the hosted page you will be hit with a Pre-transform error: Failed to resolve import "svelte/internal/disclose-version" from "src/App.svelte". Does the file exist?
8 replies
[Svelte + Vite + Deno 2.0] Svelte and Vite configuration without a package.json
Reproduction steps:
- Create a folder for the project for example
Test Svelte
- Enter Test Svelte
and run deno init
. That will create a deno.json
,main.ts
and main_test.ts
.
- The contents of deno.json
are as follows :
- Create a index.html
in Test Svelte
folder with the following contents :
8 replies