Gathering detailed insights and metrics for gatsby-plugin-loadable-components-ssr-fix
Gathering detailed insights and metrics for gatsby-plugin-loadable-components-ssr-fix
Gathering detailed insights and metrics for gatsby-plugin-loadable-components-ssr-fix
Gathering detailed insights and metrics for gatsby-plugin-loadable-components-ssr-fix
Gatsby plugin for using @loadable/component with Gatsby's SSR
npm install gatsby-plugin-loadable-components-ssr-fix
Typescript
Module System
Min. Node Version
Node Version
NPM Version
Updated dependencies
Updated on May 15, 2020
Renamed option renderFn to useHydrate
Updated on Mar 03, 2020
Added option to specify render function
Updated on Mar 03, 2020
Fixed error logged on console on develop
Updated on Mar 03, 2020
Fixed a bug that rendered all chunks on all the pages
Updated on Dec 18, 2019
v1.0.6
Updated on Dec 15, 2019
JavaScript (98.39%)
Shell (1.61%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
49 Stars
96 Commits
25 Forks
4 Watchers
26 Branches
14 Contributors
Updated on Jul 03, 2023
Latest Version
2.0.2
Package Id
gatsby-plugin-loadable-components-ssr-fix@2.0.2
Unpacked Size
7.54 kB
Size
2.95 kB
File Count
9
NPM Version
6.13.4
Node Version
13.6.0
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
2
4
Server-side rendering loadable components in your gatsby application.
npm install --save gatsby-plugin-loadable-components-ssr
This plugin also requires @loadable/component
as a peer dependency:
npm install --save @loadable/component
As described in the documentation a series of steps must be followed to implement server-side rendering in your app. However, it's not trivial to apply them to a gatsby application.
This plugin implements the steps described in the link above using gatsby's APIs, so you can use it only by adding
gatsby-plugin-loadable-components-ssr
in your list of gatsby plugins.
Simply add gatsby-plugin-loadable-components-ssr
to the plugins array in gatsby-config.js
.
1// gatsby-config.js 2 3module.exports = { 4 plugins: [ 5 'gatsby-plugin-loadable-components-ssr', 6 // OR 7 { 8 resolve: `gatsby-plugin-loadable-components-ssr`, 9 options: { 10 // Whether replaceHydrateFunction should call ReactDOM.hydrate or ReactDOM.render 11 // Defaults to ReactDOM.render on develop and ReactDOM.hydrate on build 12 useHydrate: true, 13 }, 14 } 15 ], 16}
This plugin uses replaceHydrateFunction
API. If your application also implements this API (gatsby-browser.js
)
make sure you wrap your implementation with loadableReady(() => ...)
.
Before (from the example in here):
1// gatsby-browser.js 2 3exports.replaceHydrateFunction = () => { 4 return (element, container, callback) => { 5 ReactDOM.render(element, container, callback); 6 }; 7};
After:
1// gatsby-browser.js 2 3const loadableReady = require('@loadable/component').loadableReady; 4 5exports.replaceHydrateFunction = () => { 6 return (element, container, callback) => { 7 loadableReady(() => { 8 ReactDOM.render(element, container, callback); 9 }); 10 }; 11};
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
Found 4/21 approved changesets -- score normalized to 1
Reason
detected GitHub workflow tokens with excessive permissions
Details
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
license file not detected
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
54 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
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