Typescript errors in Svelte components not managed?
electrotype opened this issue · 1 comments
When there are Typescript errors in the <script lang="ts"> part of a Svelte component, my editor (VSCode) does show them properly, but Rollup (with this plugin and sveltePreprocess()) still bundles everything as if there were no errors.
When it's a critical syntax error, Rollup does display the error properly. Ex:
impoxxxt { onMount } from "svelte";
But not when it's a type error. Ex:
something.thisDoesntExists();
I'm quite new to this setup. Is there a way to make Rollup show all errrors and refuse to bundle if there are some?
There's no way to prevent roll-up from building if it's only a type error. But there's svelte-check which will show these errors, and you could run it before your production build to catch errors and not build if there are some.