Skip to content

Svelte scoped: presetWind4 on-demand option for theme doesn't work in build #5073

@henrikvilhelmberglund

Description

@henrikvilhelmberglund

UnoCSS version

v66.6.0

Describe the bug

It seems like

 presetWind4({
      preflights: {
        theme: "on-demand"
      }
})

doesn't work in Svelte scoped when built which isn't great as it's the default option.

Reproduction

Repro:
https://github.com/henrikvilhelmberglund/unocss-svelte-scoped-presetwind4-example

  1. nr dev
    Works fine.
  2. nr build && nr preview
    Looks messed up.
  3. Set theme: true
    Looks fine again.

System Info

Win10, Brave, Svelte-scoped

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions