-
Notifications
You must be signed in to change notification settings - Fork 1
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
Migrate to Bun #114
base: main
Are you sure you want to change the base?
Migrate to Bun #114
Conversation
First speed test comparisonDependencies installation (Husky included - from scratch)
BuildmacOS: 21s ➜ 22s
CI Node+pnpm / Bun installation (Husky included)Before: 8s Unlighthouse checkBefore: 1m15s Overall CI improvements (PR only)Before: 2m10s |
Follow-up for SSG (GitHub Pages) support: gornostay25/svelte-adapter-bun#26 |
# Conflicts: # package.json # pnpm-lock.yaml
# Conflicts: # package.json # pnpm-lock.yaml
This migration is finally ready to be performed. One last doubt: I often see (and I experienced it) people complaining about some little different behaviors between Node and Bun, that the Bun team is well aware of and actively working on. I'm a bit hesitant because for now, everything's good, however, nothing guarantees that we won't stumble across a similar issue someday... Do we need to wait a little more? Do we care? Couldn't we simply revert this PR if something goes wrong? I don't know... |
I finally tested it and reviewed it, it works perfectly. Well done! 👋 |
As Bun 1.0 is officially out and we are always the first to opt-in to the latest technologies, let's try it and see if we can get better performance!
We don't have much to change as Bun is a drop-in replacement and we don't use many components that Bun replaces, so it's pretty straightforward.
Changes
pnpm
with Bun in the lock file and CIChange from@sveltejs/adapter-static
tosvelte-adapter-bun
(that should work the same).gitattributes
for optimal lock file supportSpeed gains
What will be impacted
package.json
scriptsWhat won't be impacted
What's needed before merge
Check that it's compatible with static GitHub Pageswe don't have any bun-specific feature insrc
, should be fineNote
To optimize support for
bun.lockb
by git, add this to your global configuration (source):