Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

TypeScript: sapper dev crashes on syntax errors #1375

Closed
plashenkov opened this issue Aug 8, 2020 · 5 comments
Closed

TypeScript: sapper dev crashes on syntax errors #1375

plashenkov opened this issue Aug 8, 2020 · 5 comments

Comments

@plashenkov
Copy link

As @benmccann noted in his comment #760 (comment) it's better to report TypeScript-related bugs as a new issues, so...

I've found that when using TypeScript with Sapper, sapper dev crashes when some mistakes/errors appear in source files.
It works correctly in JS mode.

Here is the example: https://take.ms/i9Ntm
(this example is taken from this template: https://github.com/babichjacob/sapper-typescript-graphql-template)

@nikibreg
Copy link

I think that's generally the expected behaviour of TypeScript.

@plashenkov
Copy link
Author

It's okay for TypeScript transpiler to "crash" on syntax errors. As well as ES* transpiler. But dev server shouldn't crash when you do some accidental mistakes. It's developer unfriendly. You just type something incorrect, then your IDE or editor autosaves this, and dev server crashes, and you have to manually restart it. That's not OK.

@benmccann
Copy link
Member

benmccann commented Aug 16, 2020

Thanks for taking the time to file this and providing a way to reproduce. I took a look at this and it also happens with https://github.com/sveltejs/template after running node scripts/setupTypeScript.js, so this is a bug with @rollup/plugin-typescript because it doesn't happen with rollup-plugin-typescript2

@benmccann
Copy link
Member

I've done ahead and filed an issue over in the plugin repo: rollup/plugins#542

@plashenkov
Copy link
Author

Great, thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants