DEV Community

Discussion on: Simplest way to set up Svelte with Tailwind CSS

Collapse
 
tehmoros profile image
Piotr "MoroS" Mrożek • Edited

When doing this from scratch, you might run into PostCSS complaining about the lack of configuration files and basically doing nothing. The one thing missing to glue everything together in this case is the postcss.config.js file. The simplest version of this file, that includes Tailwind and Autoprefixer, is given here: tailwindcss.com/docs/installation#...

EDIT: Alternatively, you can simply add PostCSS configuration for rollup.config.js instead of the postcss: true line (to keep the number of files in project root to a minimum):

//...
  postcss: {
    plugins: [
     require("tailwindcss"), 
     require("autoprefixer"),
    ],
  },
//...
Enter fullscreen mode Exit fullscreen mode