diff --git a/src/corePlugins.js b/src/corePlugins.js index 47cc5a149..ede2c9b04 100644 --- a/src/corePlugins.js +++ b/src/corePlugins.js @@ -53,7 +53,7 @@ import zIndex from './plugins/zIndex' import _ from 'lodash' import configurePlugins from './util/configurePlugins' -function loadUtilityPlugins({ theme, variants, corePlugins: userCorePluginConfig }, plugins) { +function loadPlugins({ theme, variants, corePlugins }, plugins) { const defaultCorePluginConfig = _.fromPairs( Object.keys(plugins).map(plugin => [ plugin, @@ -64,63 +64,61 @@ function loadUtilityPlugins({ theme, variants, corePlugins: userCorePluginConfig ]) ) - return configurePlugins(plugins, userCorePluginConfig, defaultCorePluginConfig) + return configurePlugins(plugins, corePlugins, defaultCorePluginConfig) } export default function(config) { - return [ - preflight(), - ...loadUtilityPlugins(config, { - lists, - appearance, - backgroundAttachment, - backgroundColors, - backgroundPosition, - backgroundRepeat, - backgroundSize, - borderCollapse, - borderColors, - borderRadius, - borderStyle, - borderWidths, - cursor, - display, - flexbox, - float, - fonts, - fontWeights, - height, - leading, - margin, - maxHeight, - maxWidth, - minHeight, - minWidth, - negativeMargin, - objectFit, - objectPosition, - opacity, - outline, - overflow, - padding, - pointerEvents, - position, - resize, - shadows, - svgFill, - svgStroke, - tableLayout, - textAlign, - textColors, - textSizes, - textStyle, - tracking, - userSelect, - verticalAlign, - visibility, - whitespace, - width, - zIndex, - }), - ] + return loadPlugins(config, { + preflight, + lists, + appearance, + backgroundAttachment, + backgroundColors, + backgroundPosition, + backgroundRepeat, + backgroundSize, + borderCollapse, + borderColors, + borderRadius, + borderStyle, + borderWidths, + cursor, + display, + flexbox, + float, + fonts, + fontWeights, + height, + leading, + margin, + maxHeight, + maxWidth, + minHeight, + minWidth, + negativeMargin, + objectFit, + objectPosition, + opacity, + outline, + overflow, + padding, + pointerEvents, + position, + resize, + shadows, + svgFill, + svgStroke, + tableLayout, + textAlign, + textColors, + textSizes, + textStyle, + tracking, + userSelect, + verticalAlign, + visibility, + whitespace, + width, + zIndex, + }) }