Skip to content

Conversation

benface
Copy link
Contributor

@benface benface commented Jun 23, 2018

Replaces #457

This feature was previously discussed here: tailwindlabs/discuss#37

I needed this for a custom gulp build script where the user is able to override parts of the Tailwind config using a JSON file, so the final config is built dynamically rather than contained in a single file. I am not sure if I implemented it properly, as I didn't take the time to go deep in the codebase, but this worked for me and all the tests passed. I'm sorry if I missed anything; if so please let me know. Also I imagine it would be a good idea to add a test for this feature.

@Krato
Copy link

Krato commented Jun 25, 2018

Why is this not merged? Thanks

@adamwathan
Copy link
Member

Why is this not merged? Thanks

Because it was opened two days ago and that was the weekend.

@adamwathan adamwathan merged commit 46058cf into tailwindlabs:master Jun 25, 2018
@MindTooth
Copy link

Hi,

I hate to ask, and after a couple of day, I don't know where else to ask for help. Been toying with Parcel lately, and I'm unable to use this method I believe. The CSS don't get transformed. If I change to using arrays, it works fine.

Am I to understand that this supports the following? :

module.exports = {
  plugins: {
    tailwindcss: { config: './tailwind.config.js' }
  }
}

(postcss.config.js)

Real Life Example

module.exports = {
  plugins: {
    'postcss-import': true,
    tailwindcss: { config: './tailwind.config.js' },
    'postcss-simple-vars': true,
    'postcss-mixins': true,
    'postcss-nested': true,
    'postcss-preset-env': true,
    autoprefixer: true
  }
}

(postcss.config.js)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants