-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve hot-reloading building only the necessary files (now is building all the app again) #556
Comments
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)
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 |
@paperdave I’ve submitted a Bun issue proposing a feature that could greatly improve entrypoint analysis for both Bake and Bun.build. In Brisa we use it for detecting which i18n keys are consumed in the web components, so that each page loads later during However, now we can do it because until recently IIFE was not supported, and for each client page we were doing a different build with a single entrypoint as IIFE workaround (which makes it take a long time to build for large codebase projects). |
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 🤗
Note
We use Bun for all the tooling part. For the output we support both Bun and Node.js.
The text was updated successfully, but these errors were encountered: