Tailwindcss: Request for config example when using postcss-loader

Created on 31 Jul 2018  路  4Comments  路  Source: tailwindlabs/tailwindcss

I'm using Vue-cli 3 and out of the box, it sets up a PostCSS config using the object syntax

plugins: {
  autoprefixer: {}
}

What would be the object to pass to Tailwind in this case?

Most helpful comment

Just put the path to your config file:

plugins: {
  tailwindcss: "./tailwind.js",
  autoprefixer: {}
}

Example from a Vue CLI 3 project: https://github.com/adamwathan/vue-cli3-tailwind/blob/master/package.json#L33-L39

All 4 comments

You can replace it with the old syntax if it's ok for you:

module.exports = {
    plugins: [
        require('tailwindcss')('./tailwind.js'),
        require('autoprefixer')(),
    ]
}

@tzurbaev I already know that.

Just put the path to your config file:

plugins: {
  tailwindcss: "./tailwind.js",
  autoprefixer: {}
}

Example from a Vue CLI 3 project: https://github.com/adamwathan/vue-cli3-tailwind/blob/master/package.json#L33-L39

@adamwathan Thank you very much!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Tjoosten picture Tjoosten  路  3Comments

benface picture benface  路  3Comments

Quineone picture Quineone  路  3Comments

manniL picture manniL  路  3Comments

chasegiunta picture chasegiunta  路  3Comments