Skip to content

Commit

Permalink
chore: update svelte.dev README (#8894)
Browse files Browse the repository at this point in the history
* Fix svelte.dev running locally instructions

After a clean clone, the `svelte` package needs to have its `/types`
directory generated for `pnpm dev` to work

* Update note about REPL

Firefox supports `import` in workers since version 114; confirmed that
the REPL works with `pnpm dev` in Firefox
  • Loading branch information
zqianem committed Jul 2, 2023
1 parent 4d71ab7 commit 12f8e90
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sites/svelte.dev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@

A local database is only required in dev mode if you want to test reading and writing saved REPLs on it. Without a local database in dev mode, the REPL will be able to load saved REPLs from the production database, but not save them.

Note also that in dev mode, the REPL will currently only work in Chrome, [as noted in the Vite documentation](https://vitejs.dev/guide/features.html#web-workers), pending support in Firefox for `import` statements in web workers.
Note also that in dev mode, the REPL requires support for [`import` statements in web workers](https://caniuse.com/mdn-javascript_operators_import_worker_support), [as noted in the Vite documentation](https://vitejs.dev/guide/features.html#web-workers). You may need to update your browser to the latest version.

If you do want to use a database, set it up on [Supabase](https://supabase.com) with the instructions [here](https://github.com/sveltejs/sites/tree/master/db) and set the corresponding environment variables.

Run the site sub-project:
Build the `svelte` package, then run the site sub-project:

```bash
pnpm install
pnpm --dir ../../packages/svelte build
pnpm dev
```

Expand Down

0 comments on commit 12f8e90

Please sign in to comment.