rails/tailwindcss-rails

tailwind.config.js not generated

sMouaad opened this issue · 3 comments

As the title suggests, tailwind.config.js is not generated when using rails new --css tailwind

Here is what happens when I execute this command rails tailwindcss:install

Image

whereas it used to generate one with this content :

const defaultTheme = require('tailwindcss/defaultTheme')

module.exports = {
  content: [
    './public/*.html',
    './app/helpers/**/*.rb',
    './app/javascript/**/*.js',
    './app/views/**/*.{erb,haml,html,slim}'
  ],
  theme: {
    extend: {
      fontFamily: {
        sans: ['Inter var', ...defaultTheme.fontFamily.sans],
      },
    },
  },
  plugins: [
    // require('@tailwindcss/forms'),
    // require('@tailwindcss/typography'),
    // require('@tailwindcss/container-queries'),
  ]
}

Just wondering why did you close it? I have the same problem and I am not sure how to configure tailwind in this case.

@jakon89 Tailwind v4 no longer uses a config file for configuration. Please see the release notes: https://tailwindcss.com/blog/tailwindcss-v4#css-first-configuration

@jakon89 You can also pin to v3 if you prefer not to deal with learning a new method of configuration. See README / You don't have to upgrade