tailwindcss/src/lib/evaluateTailwindFunctions.js
Adam Wathan b2b95d5738 Register config file with Webpack for watching
This change tells Webpack (for those using it) that the config file
used should be tracked as a dependency and that the CSS should be
re-compiled if that config file changes.

It's careful to make sure the config file is loaded fresh every single
time to avoid weird caching issues.
2017-11-03 09:54:15 -04:00

15 lines
269 B
JavaScript

import _ from 'lodash'
import functions from 'postcss-functions'
export default function(config) {
const options = config()
return functions({
functions: {
config: function (path) {
return _.get(options, _.trim(path, `'"`))
}
}
})
}