tailwindcss: [v4] importing tailwindcss/utilities breaks hmr

Im using:

The following code works perfectly:

@import "../theme/_index.scss" layer(theme);

@import "tailwindcss/preflight" layer(base);
@import "../base/_index.scss" layer(base);
@import "../plugins/postcss/_index.scss" layer(base);

@import "../plugins/formkit/_index.scss" layer(components);

But whenever i try and import the utilities from tailwind like so:

@import "../theme/_index.scss" layer(theme);

@import "tailwindcss/preflight" layer(base);
@import "../base/_index.scss" layer(base);
@import "../plugins/postcss/_index.scss" layer(base);

@import "../plugins/formkit/_index.scss" layer(components);

@import "tailwindcss/utilities" layer(utilities);

The HMR stops working, it does still say that the HMR got updated but it wont actually apply the changes to the front-end. Whenever i save my main scss file, the changes actually get applied.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 28 (10 by maintainers)

Most upvoted comments

Hello,

Is this issue still active? I would like to work on this.

Best Regards.