Gathering detailed insights and metrics for postcss-load-plugins
Gathering detailed insights and metrics for postcss-load-plugins
Gathering detailed insights and metrics for postcss-load-plugins
Gathering detailed insights and metrics for postcss-load-plugins
npm install postcss-load-plugins
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (86.15%)
CSS (13.85%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
NOASSERTION License
20 Stars
151 Commits
6 Forks
1 Watchers
1 Branches
5 Contributors
Updated on Jun 16, 2020
Latest Version
2.3.0
Package Id
postcss-load-plugins@2.3.0
Size
4.42 kB
NPM Version
4.1.2
Node Version
7.5.0
Published on
Feb 13, 2017
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
1npm i -D postcss-load-plugins
npm i -S|-D postcss-plugin
Install plugins and save them to your package.json dependencies/devDependencies.
package.json
Create postcss
section in your projects package.json
.
App
|– client
|– public
|
|- package.json
1{ 2 "postcss": { 3 "plugins": { 4 "postcss-plugin": {} 5 } 6 } 7}
.postcssrc
Create a .postcssrc
file.
App
|– client
|– public
|
|- (.postcssrc|.postcssrc.json|.postcssrc.yaml)
|- package.json
JSON
1{ 2 "plugins": { 3 "postcss-plugin": {} 4 } 5}
YAML
1plugins: 2 postcss-plugin: {}
postcss.config.js
or .postcssrc.js
You may need some JavaScript logic to generate your config. For this case you can use a file named postcss.config.js
or .postcssrc.js
.
App
|– client
|– public
|
|- (postcss.config.js|.postcssrc.js)
|- package.json
Plugins can be loaded in either using an {Object}
or an {Array}
.
{Object}
1module.exports = (ctx) => ({ 2 plugins: { 3 'postcss-plugin': ctx.plugin 4 } 5})
{Array}
1module.exports = (ctx) => ({ 2 plugins: [ 3 require('postcss-plugin')(ctx.plugin) 4 ] 5})
Plugin options can take the following values.
{}
: Plugin loads with defaults
1'postcss-plugin': {} || null
:warning:
{}
must be an empty object
{Object}
: Plugin loads with options
1'postcss-plugin': { option: '', option: '' }
false
: Plugin will not be loaded
1'postcss-plugin': false
Plugin order is determined by declaration in the plugins section.
1{ 2 plugins: { 3 'postcss-plugin': {}, // plugins[0] 4 'postcss-plugin': {}, // plugins[1] 5 'postcss-plugin': {} // plugins[2] 6 } 7}
When using a function (postcss.config.js)
, it is possible to pass context to postcss-load-plugins
, which will be evaluated before loading your plugins. By default ctx.env (process.env.NODE_ENV)
and ctx.cwd (process.cwd())
are available.
postcss.config.js
1module.exports = (ctx) => ({ 2 plugins: { 3 postcss-import: {}, 4 postcss-modules: ctx.modules ? {} : false, 5 cssnano: ctx.env === 'production' ? {} : false 6 } 7})
1const { readFileSync } = require('fs') 2 3const postcss = require('postcss') 4const pluginsrc = require('postcss-load-plugins') 5 6const css = readFileSync('index.css', 'utf8') 7 8const ctx = { modules: true } 9 10pluginsrc(ctx).then((plugins) => { 11 postcss(plugins) 12 .process(css) 13 .then((result) => console.log(result.css)) 14})
![]() Michael Ciniawsky |
![]() Mateusz Derks |
![]() Diogo Franco |
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/4 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
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-06-30
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