Skip to content

Bug when combining Antd and TailwindCSS v4 #1345

Open
@muzammil0011

Description

@muzammil0011

What version of Tailwind CSS are you using?
v4.0.6

What build tool (or framework if it abstracts the build tool) are you using?
wxt 0.20.6, react 19.1.0, antd ^5.24.9,

What version of Node.js are you using?
v20.15.1

What browser are you using?
Chrome

What operating system are you using?
Windows

Reproduction URL

When combining TailwindCSS with AntD, the TailwindCSS intellicense stops working

Intellicense does not work:

@layer theme, base, antd, components, utilities;
@import "tailwindcss";

Intellicense works:
@import "tailwindcss";

This issue occurs in TailwindCSS v4

Whenever I define custom theme props in Tailwind CSS, they are also not working.

My wxt.config.ts

import { defineConfig } from "wxt";
import tailwindcss from "@tailwindcss/vite";
import path from "path";
// See https://wxt.dev/api/config.html
export default defineConfig({
	modules: ["@wxt-dev/module-react", "@wxt-dev/auto-icons"],
	autoIcons: {
		baseIconPath: "assets/icon.png",
	},
	vite: (configEnv: { mode: string }) => ({
		plugins: [tailwindcss()],
		resolve: {
			alias: {
				"@": path.resolve(__dirname),
			},
		},
	}),
	manifest: {
		permissions: ["storage"],
		author: {
			email: "[email protected]",
		},
	},
});

tailwind.config.ts

import { fontFamily } from "tailwindcss/defaultTheme";

/** @type {import('tailwindcss').Config} */
export default {
	darkMode: "class",
	prefix: "",
	content: ["./entrypoints/**/*.{html,ts,tsx}", "./components/**/*.{ts,tsx}"],
	theme: {
		extend: {
			fontFamily: {
				title: ["'Poppins'", ...fontFamily.sans],
			},
		},
	},
	plugins: [],
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions