Header menu logo vite-plugin-fable

Technical implications

When working on this plugin, there are a lot of moving pieces involved:

All these pieces of technologies need to be in tune before any of this can work.

vite-plugin-fable

The combination of a thin JavaScript wrapped that communicates with a dotnet process via JSON-RPC.

index.js

This Vite plugin harnesses the power of both Vite specific hooks and Rollup hooks.
While both offer documentation, occasionally you might find it doesn't cover every scenario. In those moments, a bit of trial and error becomes part of the adventure. Alternatively, reaching out to the vibrant community on the Vite Discord can shine a light on the trickier parts.

Fable.Daemon

The dotnet process leverages StreamJsonRpc alongside a mailbox processor for managing incoming requests. The art lies in ensuring a proper response is always dispatched, even when facing the unexpected, like an issue in the user code.

Fable.Compiler

Fable.Compiler emerges from a carve-out of the codebase originally part of Fable.Cli. It's worth noting that this NuGet package is in its early stages, crafted specifically for this explorative phase. Navigating this terrain often involves simultaneous tweaks in both this project and Fable.Daemon. To streamline this process, you can set <UseLocalFableCompiler>true</UseLocalFableCompiler> in the Directory.Build.props file, ensuring a smoother development experience.

Trivia

NCave's F# Fork

Fable takes a unique path by not relying on the official releases of the F# compiler, sidestepping what you might have installed in your SDK or found on NuGet. Instead, it embraces a specialized fork crafted by an enigmatic figure known as NCave. A little piece of fun trivia: the true identity of NCave remains a mystery, and there's a notable silence between the Fable and F# teams. So, if you had preconceived notions about their collaboration, consider this a gentle nudge towards the bleak reality.

On a personal note, I've contributed a handful of PRs to NCave's fork, specifically to harness the graph-based checking algorithm.

Conclusion

Contributing to this project presents a significant challenge, necessitating a broad understanding of the aforementioned topics. This isn't by design but simply reflects the complex nature of the project.

Next

Type something to start searching.