Skip to content

Has anyone got Tailwind V4 to work with Gulp? #17136

Answered by wongjn
cannon303 asked this question in Help
Discussion options

You must be logged in to vote
  • Add a .gitignore file with the content:
    /node_modules
    
    This will make Tailwind not scan the node_modules folder, which is what we want since it does not contain any template code for the project. See the documentation for details.
  • Update the PostCSS plugins to only be @tailwindcss/postcss:
     module.exports = {
       plugins: [
    -        require('tailwindcss/nesting'),
    -        require("tailwindcss"),
    -        require('tailwindcss'),
    -        require('autoprefixer'),
    +        require("@tailwindcss/postcss"),
       ],
     };
    This follows the PostCSS integration guide.
  • Remove require() of tailwind in gulpfile.js:
    @@ -5,7 +5,6 @@ const cache = require('gulp-cache');
     const uglify = require('gulp-uglify…

Replies: 1 comment 13 replies

Comment options

You must be logged in to vote
13 replies
@cannon303
Comment options

@cannon303
Comment options

@cannon303
Comment options

@wongjn
Comment options

wongjn Mar 12, 2025
Collaborator

Answer selected by cannon303
@cannon303
Comment options

@cannon303
Comment options

@wongjn
Comment options

wongjn Mar 12, 2025
Collaborator

@cannon303
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants