Skip to content

tailwind.config.js not generated #487

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sMouaad opened this issue Feb 2, 2025 · 3 comments
Closed

tailwind.config.js not generated #487

sMouaad opened this issue Feb 2, 2025 · 3 comments

Comments

@sMouaad
Copy link

sMouaad commented Feb 2, 2025

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'),
  ]
}
@sMouaad sMouaad closed this as completed Feb 2, 2025
@jakon89
Copy link

jakon89 commented Feb 13, 2025

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

@patriciomacadden
Copy link
Contributor

@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

@flavorjones
Copy link
Member

@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

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

No branches or pull requests

4 participants