title: Svelte build initial render to index.html file
body: <p>I've decided try out Svelte for my next website, and this will be a static website hosted using GitLab pages.</p>
  
  <p>I got the basic compilation working which generates <code>dist/bundle.js</code> and <code>dist/bundle.css</code>.</p>
  
  <p>The issue is that I cannot upload this <code>dist</code> folder as there is no <code>index.html</code> file.</p>
  
  <p>How do I get Svelte/rollup to generate an <code>index.html</code> file which contains the <strong>initial</strong> render?</p>
  
  <hr>
  
  <p>The other option is to create my own <code>index.html</code> file and import <code>bundle.js</code>. This is not an option for me because the initial render is now generated at runtime via javascript instead of at compile-time, potentially having a negative SEO impact and preventing users without javascript from at least seeing something.</p>
  
  <hr>
  
  <p>I was also looking at Sapper which does server-side rendering, which, from what I know, does an initial rendering server-side. However, this seems to require you to have a server instead of rendering to a file, and seems overly complicated for a static single-page website.</p>