Skip to content

Extra steps for getting this working with Fable plugin for Vite #20

@Larocceau

Description

@Larocceau

to get Feliz.DaisyUI working with the Fable plugin for vite, you need to add DaisyUI.fs as an extra source to tailwind; since TailWind 4, this is done using CSS rules:

@import 'tailwindcss';
+ @source 'fable_modules/Feliz.DaisyUI.5.0.0/DaisyUI.fs';


@plugin 'daisyui' {
    themes: all;
}

This does make your bundle larger than it needs to be, as it pulls in all of DaisyUI, as opposed to the classes you actually need!

This difference comes from the fact that when using the Fable plugin, your JS is not available on disk (only in memory), and therefore Tailwind cannot detect the inlined daisy classes.

Perhaps worth mentioning this in the docs? I'm happy to make the change, I suppose the "use" page would be the most appropriate spot?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions