Created
September 1, 2025 20:51
-
-
Save HarryMcCarney/0ee4ff9ddbb2bb3657b2f07576d5123e to your computer and use it in GitHub Desktop.
Build and watch fable with vite
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #r "nuget: Fun.Build, 1.1.15" | |
| open Fun.Build | |
| open System.IO | |
| pipeline "Client" { | |
| description "Build and Watch Client" | |
| stage "Restore dependencies" { | |
| run "dotnet tool restore" | |
| run "npm install" | |
| } | |
| stage "Clean artifacts" { | |
| run(fun _ -> | |
| if Directory.Exists "build" then | |
| Directory.Delete("build", true) | |
| Directory.CreateDirectory "build" |> ignore | |
| ) | |
| } | |
| stage "Watch" { | |
| paralle | |
| run "dotnet fable watch src --verbose -o build" | |
| run "npx vite" | |
| run "npx @tailwindcss/cli -i public/input.css -o public/style.css --watch --content \"./src/**/*.{fs}\"""" | |
| } | |
| runIfOnlySpecified false | |
| } | |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
import { defineConfig } from 'vite';
export default defineConfig({
})