my-svelte-template Svelte Themes

My Svelte Template

Testing Gitpod

svelte app with Gitpod setup

This is a project template for Svelte apps.

SvelteKit

If you are looking for a SvelteKit example, please use https://github.com/gitpod-io/sveltekit-example.

Special config for Gitpod to make rollup work

Rollup needs to know how to reach the livereload endpoint. To configure that we need to do two things in our config:

  1. set an environment variable
    export CLIENT_URL="$(gp url 35729)/livereload.js?snipver=1&port=443"
    
  2. pass the env value to the livereload module in rollup.config.js:65
         !production && livereload({
             watch: 'public',
             clientUrl: process.env.CLIENT_URL
         }),
    

This will set CLIENT_URL with the workspace url of 35729 (default port for livereload).

Top categories

Loading Svelte Themes