Skip to content

[Feature]: How to resolve the conflict between tailwindcss import and @import css? #12335

@ckken

Description

@ckken

What problem does this feature solve?

https://github.com/web-infra-dev/rspack/blob/ab1ee772ff89ffb19a0094b8481e1bbd474c98b1/website/docs/en/blog/announcing-0-7.mdx#css-import-rules-must-precede-all-other-rules

tailwindcss v4

@layer base {
	.tailwindcss-host-contaner {
		@import "tailwindcss/preflight";
	}
}

or

.tailwindcss-host-contaner {
	@import "tailwindcss/preflight" layer(base);
	@import "tailwindcss/utilities" layer(utilities);
}
Error: Can't resolve 'tailwindcss/preflight'

postcss-import use and no work also!

What does the proposed API of configuration look like?

Tailwind CSS does not require local project installation; it can be used normally after installing plugin-tailwindcss.

Metadata

Metadata

Assignees

No one assigned

    Labels

    pending triageThe issue/PR is currently untouched.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions