Gathering detailed insights and metrics for styled-jsx-plugin-postcss
Gathering detailed insights and metrics for styled-jsx-plugin-postcss
Gathering detailed insights and metrics for styled-jsx-plugin-postcss
Gathering detailed insights and metrics for styled-jsx-plugin-postcss
npm install styled-jsx-plugin-postcss
65.2
Supply Chain
98.9
Quality
74.7
Maintenance
100
Vulnerability
100
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
92 Stars
40 Commits
17 Forks
4 Watching
7 Branches
11 Contributors
Updated on 14 Oct 2024
JavaScript (99.79%)
CSS (0.21%)
Cumulative downloads
Total Downloads
Last day
-6.1%
1,916
Compared to previous day
Last week
-1.8%
11,610
Compared to previous week
Last month
-10.9%
50,541
Compared to previous month
Last year
-6.8%
635,889
Compared to previous year
1
1
Use PostCSS with styled-jsx 💥
⚠️ This plugin is not actively being maintained. If you want me to work on it please consider donating.
Companies and individuals who sponsored some work on this library:
Install this package first.
1npm install --save styled-jsx-plugin-postcss
Next, add styled-jsx-plugin-postcss
to the styled-jsx
's plugins
in your
babel configuration:
1{ 2 "plugins": [ 3 ["styled-jsx/babel", { "plugins": ["styled-jsx-plugin-postcss"] }] 4 ] 5}
With config:
1{ 2 "plugins": [ 3 [ 4 "styled-jsx/babel", 5 { 6 "plugins": [ 7 [ 8 "styled-jsx-plugin-postcss", 9 { 10 "path": "[PATH_PREFIX]/postcss.config.js", 11 "compileEnv": "worker" 12 } 13 ] 14 ] 15 } 16 ] 17 ] 18}
When using Node.js v12.3.0 and above the plugin defaults to compiling using a worker thread instead of a child process. This results in faster builds.
If for any reason you want to force compiling using a child process (slower) you can register the plugin with the config option compileEnv
set to process
.
Usage with Create React App requires you to either eject or use react-app-rewired.
Here is an example using react-app-rewired
:
1// config-overrides.js 2// this file overrides the CRA webpack.config 3 4const { getBabelLoader } = require("react-app-rewired"); 5 6module.exports = function override(config, env) { 7 const loader = getBabelLoader(config.module.rules); 8 9 // Older versions of webpack have `plugins` on `loader.query` instead of `loader.options`. 10 const options = loader.options || loader.query; 11 options.plugins = [ 12 [ 13 "styled-jsx/babel", 14 { 15 plugins: ["styled-jsx-plugin-postcss"], 16 }, 17 ], 18 ].concat(options.plugins || []); 19 return config; 20};
Note: Please follow their instructions on how to set up build & test scripts, and make sure you have a correctly formatted postcss.config.js
as well.
styled-jsx-plugin-postcss
uses styled-jsx
's plugin system which is supported
from version 2. Read more on their repository for further info.
styled-jsx-plugin-postcss
uses
postcss-load-config
therefore you may want to refer to their docs to learn more about
adding plugins.
PRs and contributions are welcome!
We aim to drive development of this plugin through community contributions.
MIT
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
Found 5/23 approved changesets -- score normalized to 2
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
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
13 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
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