title: How to get sourcemaps working with svelte-preprocess, typescript, sourced .ts file
body: <p>I am using svelte-preprocess to compile typescript in my Svelte app.</p>
  <p>Here is the svelte file:</p>
  <pre><code>&lt;script lang=&quot;ts&quot; src=&quot;./component.ts&quot;&gt;&lt;/script&gt;
  &lt;template src=&quot;./component.html&gt;&lt;/template&gt;
  &lt;style src=&quot;./component.scss&quot;&gt;&lt;/style&gt;
  </code></pre>
  <p>Here is the svelte section of rollup.config.js</p>
  <pre><code>svelte({
      preprocess: sveltePreprocess({ 
          sourceMap: !production, 
          defaults: {
             markup: 'html',
             script: 'typescript',
             style: 'scss'
          }
      }),
      compilerOptions: {
          dev: !production
      }
  }),
  </code></pre>
  <p>I also have this in the config file</p>
  <pre><code>    typescript({
          sourceMap: !production,
          inlineSources: !production
      }),
  </code></pre>
  <p>The problem I'm having is that the sourcemaps aren't happening for component.ts. When I get an error in Chrome's debugger somewhere in component.ts it shows a line number at the last line of the component.svelte file instead of component.ts.</p>
  <p>When I inline the code within the script lang=&quot;ts&quot; tag it does indeed work and the sourcemaps come up fine.</p>
  <p>How do I get svelte-preprocess to work with sourcemaps, typescript and sourced from a .ts file from the svelte component file?</p>