mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
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.
15 lines
269 B
JavaScript
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, `'"`))
|
|
}
|
|
}
|
|
})
|
|
}
|