Installations
npm install babel-preset-typescript-vue2
Developer Guide
Typescript
No
Module System
CommonJS
Min. Node Version
>=8.0.0
Node Version
14.17.5
NPM Version
8.0.0
Score
54
Supply Chain
74.9
Quality
74.7
Maintenance
50
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (77.62%)
Vue (22.38%)
Developer
pawelgabryelewicz
Download Statistics
Total Downloads
264
Last Day
1
Last Week
4
Last Month
10
Last Year
56
GitHub Statistics
22 Stars
40 Commits
5 Forks
2 Watching
15 Branches
2 Contributors
Bundle Size
1.06 MB
Minified
283.24 kB
Minified + Gzipped
Package Meta Information
Latest Version
1.1.1
Package Id
babel-preset-typescript-vue2@1.1.1
Unpacked Size
7.73 kB
Size
3.13 kB
File Count
8
NPM Version
8.0.0
Node Version
14.17.5
Total Downloads
Cumulative downloads
Total Downloads
264
Last day
0%
1
Compared to previous day
Last week
0%
4
Compared to previous week
Last month
233.3%
10
Compared to previous month
Last year
-34.9%
56
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
babel-preset-typescript-vue
TypeScript preset for Babel 7.x supporting Vue.js components written in TS. A drop-in replacement for @babel/preset-typescript.
Why?
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.
How?
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.
Options
All the options match the original @babel/preset-typescript preset options.
You can read more about configuring preset options here
Original notes and issues
See @babel/preset-typescript for more information or the issues associated with the original preset package.
Install
Using npm:
1npm install --save-dev babel-preset-typescript-vue
or using yarn:
1yarn add babel-preset-typescript-vue --dev
License
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
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
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 4 are checked with a SAST tool
Reason
31 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq
- Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj
- Warn: Project is vulnerable to: GHSA-896r-f27r-55mw
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-5j4c-8p2g-v4jx
- Warn: Project is vulnerable to: GHSA-g3ch-rx76-35fx
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
- Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
- Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh
Score
1.7
/10
Last Scanned on 2025-01-27
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