Settings

Theme

Show HN: Migrate away from Vue SFC's to native TSX

npmjs.com

2 points by NikhilVerma 2 months ago · 0 comments · 1 min read

Reader

I've been actively using Vue for my official and personal projects for over 6 years now. While SFC was great it's quickly becoming a pain. It requires custom Volar plugins. It doesn't work with native typescript. The vue-tsc overrides "fs" imports just to be able to detect and run vue files.

I am not sure why Vue doesn't talk more about native TSX support because it eliminates this whole class of issues. In my work project, this has been a major pain because vue-tsc almost always crashes and I can't use the new tsgo (Typescript written in Go) because it doesn't work with SFCs

So I've made a new tool that migrates SFC to TSX. It's not a trivial migration so I've added an "LLM fallback" which takes care of the tricky things.

It made the migration of our internal codebase quite trivial. I hope you folks try it out and let me know.

No comments yet.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection