From 1819cf67d3f24ebe055b4c54b4e037a6621b3734 Mon Sep 17 00:00:00 2001 From: Adam Wathan Date: Fri, 6 Oct 2017 15:24:35 -0400 Subject: [PATCH] Allow passing config as lazy-evaluated function --- src/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/index.js b/src/index.js index 6e10d2d3c..7c3b8a3d6 100644 --- a/src/index.js +++ b/src/index.js @@ -15,6 +15,10 @@ import substituteBreakpointAtRules from './lib/substituteBreakpointAtRules' import substituteClassApplyAtRules from './lib/substituteClassApplyAtRules' const plugin = postcss.plugin('tailwind', (options = {}) => { + if (_.isFunction(options)) { + options = options() + } + const config = mergeConfig(defaultConfig, options) return postcss([