Skip to content

@tailwindcss/postcss ignores changes from CSS files (NextJS 14) #17233

Answered by jpomykala
jpomykala asked this question in Help
Discussion options

You must be logged in to vote

Okay, so before writing the post I spent ~2 hours on this, and right after @wongjn (thanks!) response I think I figured it out.

To make it work I've left my setup as is, but:

  1. I've removed 'sass' dependency at all, no idea if was needed at all if everything works without it 🤔
  2. Created v3 config tailwind.config.js
/** @type {import('tailwindcss').Config} */
module.exports = {
  prefix: 'tw-',
  important: true,
  corePlugins: {
    preflight: true,
  },
  content: [
    './pages/**/*.{js,ts,jsx,tsx,mdx}',
    './components/**/*.{js,ts,jsx,tsx,mdx}'
  ],
  theme: {
    extend: {},
  },
  plugins: [],
}
  1. Created tailwind.css
@import "tailwindcss";
@config "../tailwind.config.js";
  1. Imported

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@jpomykala
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by jpomykala
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