Gathering detailed insights and metrics for babel-preset-typescript-vue
Gathering detailed insights and metrics for babel-preset-typescript-vue
Gathering detailed insights and metrics for babel-preset-typescript-vue
Gathering detailed insights and metrics for babel-preset-typescript-vue
babel-preset-typescript-vue3
TypeScript preset for Babel 7.x supporting Vue.js 3 components written in TS
babel-preset-typescript-vue2
TypeScript preset for Babel 7.x supporting Vue.js components written in TS
@sunxiao79/babel-preset-typescript-vue
TypeScript preset for Babel 7.x supporting Vue.js components written in TS
TypeScript preset for Babel 7.x supporting Vue.js components written in TS
npm install babel-preset-typescript-vue
Typescript
Module System
Min. Node Version
Node Version
NPM Version
83.7
Supply Chain
23.7
Quality
75
Maintenance
50
Vulnerability
100
License
JavaScript (77.62%)
Vue (22.38%)
Total Downloads
15,834,346
Last Day
1,205
Last Week
34,655
Last Month
147,807
Last Year
1,921,284
MIT License
22 Stars
40 Commits
5 Forks
2 Watchers
15 Branches
2 Contributors
Updated on Jun 19, 2024
Minified
Minified + Gzipped
Latest Version
1.1.1
Package Id
babel-preset-typescript-vue@1.1.1
Size
3.12 kB
NPM Version
6.14.4
Node Version
12.16.2
Published on
May 18, 2020
Cumulative downloads
Total Downloads
Last Day
-48.7%
1,205
Compared to previous day
Last Week
-9.5%
34,655
Compared to previous week
Last Month
5.8%
147,807
Compared to previous month
Last Year
-28.9%
1,921,284
Compared to previous year
TypeScript preset for Babel 7.x supporting Vue.js 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-based Vue.js Single File Components (SFC), 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-vue
or using yarn:
1yarn add babel-preset-typescript-vue --dev
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 2/28 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- 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
Reason
33 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-23
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