😎

[WIP] Tauri + Yew で Tailwind CSS

2023/10/29に公開

tailwind.config.js を作成

中身は以下のとおり

module.exports = {
    content: [
        "./index.html",
        "./src/**/*.{rs,html,css}",
    ],
    theme: {},
    variants: {},
    plugins: [],
};

.gitignore に以下を追加しておく

tailwind.css

Trunk.toml に以下を追加することでビルド時に tailwind.css を自動生成してくれる

[[hooks]]
stage = "build"
command = "tailwindcss"
command_arguments = ["-c", "./tailwind.config.js", "-o", "./tailwind.css", "--minify"]

参考

https://dev.to/arctic_hen7/how-to-set-up-tailwind-css-with-yew-and-trunk-il9

Discussion