title: How to generate separate js files when using [slug].svelte
body: <p>I am using sapper to build a site that consists of many sub-pages that each use a different svelte component (with svg visualizations) and I plan to export it as a static site. Right now I am using a [slug].svelte file to get easy routing for the sub-pages. </p>
  
  <p>My problem is that when I export the site, it generates one single huge [slug]....js file that seems to contain all the data for the visualizations of the sub-pages. Is there a way to get smaller/single js files for each sub-page when using [slug].svelte? </p>
  
  <p>It seems I could just make my routes manually by making a folder for each sub-page and that way generate separate js files. Maybe the problem is that I am importing all the components in a single <code>_select.svelte</code> file to select the right svelte component for each sub-page. I was trying to import the components dynamically in hoping that this would generate a different js file for each sub-page, but then the static site generation won't work. I am probably doing something horribly wrong here...</p>
  
  <p>Thanks for any hints!</p>