You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Its being tested only if the options {Object} is null, if the {Object} is not null it tries to
look at the keys of the {Object}, but I believe that its being forgotten the case when the options {Object} is undefined
Module build failed: TypeError: Cannot convert undefined or null to object
at Function.keys (<anonymous>)
at load (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:42:38)
at /home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:66:18
at Array.forEach (<anonymous>)
at plugins (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:65:8)
at /home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-config/index.js:64:18
at <anonymous>
Reproduction (Code)
Not needed
Environment
Not needed
The text was updated successfully, but these errors were encountered:
Would love to but !options coerces null, false, undefined to false, while options === false means don't load this plugin in postcss-load-config e.g
.postcssrc.js
module.exports=({ options, env })=>{plugins: {// Check for options.plugin === 'undefined', // but load the plugin with defaults (the current bug)'postcss-plugin': options.plugin// if env === 'development' don't load the plugin'cssnano': env==='production' ? null : false}}
Details
Check for
undefined
in the plugin loader (postcss-load-plugins #67)Its being tested only if the options
{Object}
isnull
, if the{Object}
is notnull
it tries tolook at the keys of the
{Object}
, but I believe that its being forgotten the case when the options{Object}
isundefined
Error (Logs|Stacks)
postcss.config.js
Reproduction (Code)
Environment
The text was updated successfully, but these errors were encountered: