Open rzane opened 6 years ago
The only technical problem I see with Vue.js is type-checking, is there any project in the wild using Vue SFCs with TypeScript and type-checking? It could be pretty hard to implement the Vue parser into TypeScript file host.
If you don't want type-checking you can use transpileOnly
to still keep features like path renaming.
The only technical problem I see with Vue.js is type-checking, is there any project in the wild using Vue SFCs with TypeScript and type-checking?
Yes there are. I have a couple projects using Vue SFCs with TypeScript + types shared across all projects. VS Code is able to catch TypeScript errors in .vue files through Vetur, but Parcel will happily build the project without any errors or warnings.
I can't just use tsc --noEmit
since it doesn't read .vue files. Is there any chance Vue SFCs could get any support?
Official Vue support was added to parcel today. I was hoping that maybe I could use this plugin with a Vue SFC, but that doesn't appear to work as expected.
Here's a repro:
https://gist.github.com/rzane/f7201b93df6d5d2d49269becf53f9f00
Here's the error that gets thrown:
Would it be possible to support this?