Open aralroca opened 5 days ago
i expect most of your bundling code to be replaced by Bake. current canary branch is still very very experimental, and it's marked experimental because the shape of the api is not fully decided. for example, the way it specifies routes isnt really great.
the way bake is designed is the framework is responsible for (non-exhastive)
createClientReference
in return, Bake gives
This will definitely fix our hotreload and build time. I wonder how feasible it will be to touch the AST in the same way we are doing with Bun.build, both for analysis and some modifications, if we already have this, it would surely be fully compatible.
i havent added plugin support to bake yet but it shouldnt be a huge problem, it mostly waits on some minor cleanup i need to do
Currently, our build process has several workarounds that make it difficult to have an optimized hot reloading.
Instead of doing 2 parallel server-client builds, we are doing the following:
All this workaround makes the current hot-reloading very bad. For each change, a build of the whole app is performed: server + actions + each client page.
People say it goes fast, but if it goes fast it is because Bun is fast and the parser and generator we use is fast (meriyah + astring), but not because of our implementation.
Now Bun is optimizing this part in Bun Kit (or Bun Bake), to support a server build alongside a client build and work with hot-reloading, and also supporting IIFE (finally). I wonder, to what extent it is intended for all JSX-runtimes and how feasible it is to make this migration from the current system to the new tool offered by Bun.
@paperdave Could you please provide us with feedback on whether it is actually possible to migrate with the canary branch of Bun? Better to wait? Or is it not compatible with what you are doing? As a note, since Brisa framework is now in an experimental stage, if you want to collaborate in Brisa to test Bun Kit beyond React, it would be totally welcome 🤗