79791001

Date: 2025-10-15 09:38:56
Score: 1
Natty:
Report link

For me adding a @config '../tailwind.config.ts' line to globals.css works
(current package.json: next: 15.5.3, react: 19.1.0, tailwindcss: 4.1.14, postcss: 8.5.6)

my app/globals.css now:

@import 'tailwindcss';

@config '../tailwind.config.ts';

@theme {
  --color-primary: #000;
}

tailwind.config.ts:

import type { Config } from 'tailwindcss';

const config: Config = {
  content: ['./app/**/*.{js,ts,jsx,tsx,mdx}', './components/**/*.{js,ts,jsx,tsx,mdx}'],
  theme: {
    //rest default tailwind colors
    colors: {},
  },
  plugins: [],
};
export default config;

postcss.config.mjs:

const config = {
  plugins: {
    '@tailwindcss/postcss': {},
  },
};

export default config;

app/layout.tsx:

...
import '@/app/globals.css';
...
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @config
  • Low reputation (1):
Posted by: saldatkin