Gathering detailed insights and metrics for gatsby-plugin-preconnect
Gathering detailed insights and metrics for gatsby-plugin-preconnect
npm install gatsby-plugin-preconnect
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Verify real, reachable, and deliverable emails with instant MX records, SMTP checks, and disposable email detection.
Total Downloads
2,360,026
Last Day
1,707
Last Week
9,337
Last Month
42,473
Last Year
519,032
10 Stars
661 Commits
5 Forks
18 Branches
6 Contributors
Updated on Dec 25, 2021
Minified
Minified + Gzipped
Latest Version
1.4.0
Package Id
gatsby-plugin-preconnect@1.4.0
Unpacked Size
1.14 MB
Size
310.13 kB
File Count
21
NPM Version
8.15.0
Node Version
18.7.0
Cumulative downloads
Total Downloads
Last Day
3.8%
1,707
Compared to previous day
Last Week
-3.7%
9,337
Compared to previous week
Last Month
-8.8%
42,473
Compared to previous month
Last Year
4.4%
519,032
Compared to previous year
1
1
Quickly add a <link rel="preconnect" crossorigin>
tag for every specified domain.
npm install --save gatsby-plugin-preconnect
It simply adds a <link rel="preconnect" href="https://example.com" crossorigin>
to the page (see the
Resource Prioritization - Preconnect
guide).
1// In your gatsby-config.js 2plugins: [ 3 { 4 resolve: 'gatsby-plugin-preconnect', 5 options: { 6 domains: ['https://foo.com', 'https://bar.com'], 7 }, 8 }, 9]
crossOrigin
is set to true
by default but it can be customized, below all the available options
1plugins: [ 2 { 3 resolve: 'gatsby-plugin-preconnect', 4 options: { 5 domains: [ 6 'https://foo.com', 7 'https://bar.com', 8 { domain: 'https://enablecors.com', crossOrigin: true }, 9 { domain: 'https://disablecors.com', crossOrigin: false }, 10 { domain: 'https://corswithanonymous.com', crossOrigin: 'anonymous' }, 11 { domain: 'https://corswithcreds.com', crossOrigin: 'use-credentials' }, 12 ], 13 }, 14 }, 15]
All the available values for crossOrigin
are listed below, every other value makes the plugin throw an error
Value | Equivalent value |
---|---|
undefined | "anonymous" |
true | "anonymous" |
"anonymous" | "anonymous" |
"use-credentials" | "use-credentials" |
false | (attribute not added) |
PR or issues are welcome 👋
npm run build
on the root
then, in every test project, you need to run npm run plugin:link
to locally use itThanks goes to these wonderful people (emoji key):
Stefano Magni 💻 📖 | Dugagjin Lashi 💻 👀 | Sean King 🤔 | Andrew Schneider 💻 📖 ⚠️ | Andreas Donig 🤔 |
This project follows the all-contributors specification. Contributions of any kind welcome!
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
Found 1/30 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
license 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
43 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-03-10
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