Skip to content

Commit bdfe43a

Browse files
committed
provide corePlugins helper when running plugins
1 parent 5f6b8e3 commit bdfe43a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/class-names/runPlugin.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ export function runPlugin(plugin, params = {}) {
1717
theme: (path, defaultValue) => dlv(config, `theme.${path}`, defaultValue),
1818
variants: () => [],
1919
config: (path, defaultValue) => dlv(config, path, defaultValue),
20+
corePlugins: (path) => {
21+
if (Array.isArray(config.corePlugins)) {
22+
return config.corePlugins.includes(path)
23+
}
24+
return dlv(config, `corePlugins.${path}`, true)
25+
},
2026
target: (path) => {
2127
if (typeof config.target === 'string') {
2228
return config.target === 'browserslist'

0 commit comments

Comments
 (0)