Babel Preset for TypeScript with Vue SFC Support

JSON →
library 1.1.1 ·javascript abandoned
verified May 27, 2026

This package, `babel-preset-typescript-vue` (version 1.1.1, last updated in early 2020), provides a Babel 7.x preset specifically designed to enable TypeScript transpilation within Vue.js Single File Components (SFCs). It serves as a specialized drop-in replacement for `@babel/preset-typescript`, addressing an architectural limitation in `vue-loader` that historically prevented the standard TypeScript preset from correctly processing `<script lang="ts">` blocks within `.vue` files. The preset identifies `.vue` files with the `lang="ts"` attribute and explicitly applies `@babel/plugin-transform-typescript`, ensuring that ES6+ TypeScript syntax is correctly transpiled to a compatible JavaScript version. Its primary differentiator is this targeted fix for Vue SFCs, which was a common challenge during the transition to Babel-based TypeScript transpilation in Vue 2 projects. Given its niche role as a workaround, its relevance is tied to older `vue-loader` versions, and it is largely considered stable with no active development or planned releases.

total hits 21
actors 8 distinct systems
last hit 22h ago human
MetaBot
4
ByteDance
3
GPTBot
2
Script
1
ClaudeBot
1
Search engines
1
Humans
1

top countries 🇺🇸 United States · 🇩🇪 Germany · 🇸🇬 Singapore · 🇨🇦 Canada · 🇫🇷 France