To work with Svelte in Gitpod, you will need to properly configure your repository. Here is how to do that, assuming that you’re using the official sveltekit template.Documentation Index
Fetch the complete documentation index at: https://ona.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Create a .gitpod.yml
Start by creating a.gitpod.yml file in the root of your project and add the following to it:
5173.
Making Live Reload work
In order to make live reload work we need to add a bit of configuration as specified below:-
Set up an environment variable called
CLIENT_URLin the.gitpod.ymlconfig file as shown below please make sure that you set it up before the task which starts the dev server(which isnpm run devin this case): -
Pass the value of
CLIENT_URLenvironment variable to therollup-plugin-livereloadinrollup-config.jsinside of thepluginsarray as shown:This will setCLIENT_URLto the workspace url of port35729(default port for livereload in Gitpod).
Example Projects
| Repository | Description | Try it |
|---|---|---|
| Sveltekit template | A SvelteKit template |