Gathering detailed insights and metrics for babel-preset-typescript-vue3
Gathering detailed insights and metrics for babel-preset-typescript-vue3
Gathering detailed insights and metrics for babel-preset-typescript-vue3
Gathering detailed insights and metrics for babel-preset-typescript-vue3
npm install babel-preset-typescript-vue3
Typescript
Module System
Min. Node Version
Node Version
NPM Version
65.2
Supply Chain
23.9
Quality
84.8
Maintenance
100
Vulnerability
100
License
JavaScript (58.22%)
Vue (39.66%)
TypeScript (2.12%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
5 Stars
93 Commits
1 Watchers
3 Branches
3 Contributors
Updated on Jun 24, 2025
Minified
Minified + Gzipped
Latest Version
2.1.1
Package Id
babel-preset-typescript-vue3@2.1.1
Unpacked Size
21.46 kB
Size
3.88 kB
File Count
11
NPM Version
9.2.0
Node Version
22.15.0
Published on
Jun 24, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
TypeScript preset for Babel 7.x supporting Vue.js 3 components written in TS. A drop-in replacement for @babel/preset-typescript.
This preset was created to support TypeScript transpilation using Babel (not Microsoft TypeScript), also for Typescript Support for Vue.js 3, without enforced TS-to-JS transpilation for all files (which can be achieved by adding @babel/plugin-transform-typescript
to your Babel config).
Due to architectural limitations of vue-loader
the original @babel/preset-typescript preset was always assuming that the <script>
section of Vue SFC was written in JavaScript. This wasn't an issue when webpack
was using different loaders for .js and .ts files. Since Babel unifies that, vue-loader
is always passing this file to babel-loader
with an original filename (and a resourceQuery
which is not accessible from the transpiling preset). Since preset-typescript
was transpiling files with .ts and .tsx extensions, not .vue, SFCs were ignored and reported errors during ES6 to ES5 transpilation.
Most likely in the future, this won't be no longer needed if vue-loader
will consider also Babel transpilation. As for this is the only friendly way to resolve the issue.
This preset checks whether the .vue file (SFC) has a lang="ts"
attribute set for the <script>
tag. If so, @babel/plugin-transform-typescript is applied explicitly to the SFC file.
All the options match the original @babel/preset-typescript preset options.
You can read more about configuring preset options here
See @babel/preset-typescript for more information or the issues associated with the original preset package.
Using npm:
1npm install --save-dev babel-preset-typescript-vue3
or using yarn:
1yarn add babel-preset-typescript-vue3 --dev
This package is originated from babel-preset-typescript-vue by pawelgabryelewicz and revised to meet the Vue.js 3 requirements using @vue/compiler-sfc, and following tests.
1module: { 2 rules: [ 3 { 4 test: /\.vue$/, 5 loader: "vue-loader", 6 }, 7 { 8 test: /\.(j|t)sx?$/, 9 exclude: /node_modules/, 10 use: { 11 loader: "babel-loader", 12 options: { 13 presets: [ 14 "@babel/preset-env", 15 "babel-preset-typescript-vue3", 16 "@babel/preset-typescript", 17 ], 18 }, 19 }, 20 }, 21 ] 22}
1// babel.config.js 2export default { 3 presets: [ 4 "@babel/preset-env", 5 "babel-preset-typescript-vue3" 6 ] 7};
1{ 2 "@babel/core": "^7.0.0-0" 3}
v2.1.1 - Major dependency updates
v2.0.14 - Update Dependencies
v2.0.11 - Supports <script setup>
(Link)
v2.0.8 - Update Dependencies (vue@3.0.3 -> vue@3.0.5)
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
6 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 5
Reason
Found 0/13 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More