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_URL
in the.gitpod.yml
config file as shown below please make sure that you set it up before the task which starts the dev server(which isnpm run dev
in this case): -
Pass the value of
CLIENT_URL
environment variable to therollup-plugin-livereload
inrollup-config.js
inside of theplugins
array as shown:This will setCLIENT_URL
to the workspace url of port35729
(default port for livereload in Gitpod).
Example Projects
Repository | Description | Try it |
---|---|---|
Sveltekit template | A SvelteKit template |