Add corePlugins function to plugin API
This commit is contained in:
parent
c2b0407ffd
commit
652100e2d5
2 changed files with 63 additions and 0 deletions
|
|
@ -41,6 +41,13 @@ export default function(plugins, config) {
|
|||
postcss,
|
||||
config: getConfigValue,
|
||||
theme: (path, defaultValue) => getConfigValue(`theme.${path}`, defaultValue),
|
||||
corePlugins: path => {
|
||||
if (Array.isArray(config.corePlugins)) {
|
||||
return config.corePlugins.includes(path)
|
||||
}
|
||||
|
||||
return getConfigValue(`corePlugins.${path}`, true)
|
||||
},
|
||||
variants: (path, defaultValue) => {
|
||||
if (Array.isArray(config.variants)) {
|
||||
return config.variants
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue