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 |