Free DX idea
#3882
Replies: 1 comment 1 reply
-
@nojaf I just want to thank you for your excellent Fable Vite plugin. It made my setup so much simpler. I wish I had time and skills to maintain a fork. Will you still fix eventual broken stuff that |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Alright, folks, let's talk ReScript and Fable—both of these compile down to JavaScript, and when you're using Vite, you need those JavaScript files on disk. Fable typically handles this with
dotnet fable watch --run npx vite
, but let's be honest, it’s not the smoothest experience compared to the usual npm run dev workflow with Vite.Earlier this year, I created a Vite plugin to better integrate Fable with Vite. It’s something I’m proud of, but it was a hobby project, and I’m not planning to actively maintain it. If anyone wants to take it further, feel free to fork it.
Now, about ReScript—they've got a similar challenge: needing compiled files and dealing with multiple terminal processes. You’ve got compilation on one side and Vite on the other, and it can be a bit annoying. So, I created a simple plugin to start and stop the process within the Vite pipeline.
Here’s what it looks like:
You could easily create a similar plugin for Fable, swapping out
rescript
fordotnet fable
. The advantage of this approach is that it’s not tied to any specific Fable version, making it pretty low-maintenance. The plugin also updates the user config to ignore.res
files, which you could change to.fs(i)
for Fable.Here's how you’d use it:
This setup gives you the equivalent of:
But without needing to configure it every time.
So, if you're interested in improving your development experience, this might be something to explore. But if you’re okay with the current setup using
dotnet fable watch --run npx vite
, that’s cool too. Just sharing an option for those who might want to streamline things a bit.Beta Was this translation helpful? Give feedback.
All reactions