Gathering detailed insights and metrics for gatsby-plugin-react-decorators
Gathering detailed insights and metrics for gatsby-plugin-react-decorators
npm install gatsby-plugin-react-decorators
Typescript
Module System
Node Version
NPM Version
22.6
Supply Chain
52.2
Quality
64.6
Maintenance
50
Vulnerability
91.7
License
JavaScript (100%)
Total Downloads
671,267
Last Day
298
Last Week
1,198
Last Month
3,650
Last Year
80,278
14 Commits
3 Branches
1 Contributors
Minified
Minified + Gzipped
Latest Version
3.0.0
Package Id
gatsby-plugin-react-decorators@3.0.0
Unpacked Size
22.15 kB
Size
11.72 kB
File Count
15
NPM Version
10.2.4
Node Version
21.5.0
Publised On
30 Jan 2024
Cumulative downloads
Total Downloads
Last day
2.4%
298
Compared to previous day
Last week
45.9%
1,198
Compared to previous week
Last month
14.8%
3,650
Compared to previous month
Last year
-12%
80,278
Compared to previous year
2
3
npm install gatsby-plugin-react-decorators
gastby-config.js
file// gatsby-config.js
const opts = require('gatsby-plugin-react-decorators').decoratorOptions;
module.exports = {
plugins: [
{
resolve: "gatsby-plugin-react-decorators",
options: {
react: {
options: opts.runtime | opts.ssr
},
reactDOM: {
options: opts.runtime | opts.ssr | opts.enableProfiler
}
},
}]
}
Note that the opts.enableProfiler
option (enabled by default) will enable the React profiler (as if you had added the --profile
option to gatsby build
/gatsby develop
, or manually specified react-dom/profiling
as a webpack alias for react-dom
).
If you're using decorators during the server-side render process, add the following to your gatsby-ssr.js
file:
// gatsby-ssr.js
import { registerDecorator } from 'webpack-decorators';
// This code can be executed immediately
const exampleDecorator = {
createElement: function(originalFunc, ...args) {
// Put your custom logic here...
return originalFunc(...args);
}
};
registerDecorator('react', exampleDecorator, 'createElement');
If you're using decorators during runtime (in the browser), add the following to your gatsby-browser.js
file:
// gatsby-browser.js
import { registerDecorator } from 'webpack-decorators';
export const onClientEntry = () => {
const exampleDecorator = {
createElement: function(originalFunc, ...args) {
// Put your custom logic here...
return originalFunc(...args);
}
};
registerDecorator('react', exampleDecorator, 'createElement');
};
Note:
You can register multiple decorators with multiple
registerDecorator
statements.
Package version 3.0 and up support React/React-Dom 17.0.1 and up.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
Found 0/13 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
Score
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