Skip to content

Tailwind !important syntax and sass build error #367

@alexcroox

Description

@alexcroox

Version

@nuxtjs/tailwindcss: 4.2.0
nuxt: 2.15.7
sass: "1.32.13",
sass-loader: "10.1.1",

Reproduction Link

Steps to reproduce

<style lang="scss" scoped>
.test {
  @apply w-20 h-20 !bg-black;

  & span {
    @apply text-white;
  }
}
</style>

Errors with

Module build failed (from ./node_modules/sass-loader/dist/cjs.js):                                                                                     friendly-errors 14:55:37
SassError: expected ";".
   ╷
87 │   @apply w-20 h-20 !bg-black;

If I remove sass from the style tag it doesn't error and works as expected:

<style scoped>

Weirdly sass syntax also still works despite the tag param missing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions