2

So I've made a Bun app using bun create react

Now I'm looking to deploy it to production (via Netlify) and am at a loss as to how.

bun build doesn't seem to work. Is there a specific command that's not in the documentation?

Archie
  • 97
  • 1
  • 2
  • 6

1 Answers1

3

There are no production builds of Bun yet (as of version 0.3 at least). So you would need to use something like react-scripts or Vite.

I have built an example project just for this question :) https://github.com/JLarky/bun-netlify

The main steps are:

  1. add react-scripts
  2. disable npm install on CI
  3. install bun binary on CI
  4. use that binary to install dependencies and build the project
  5. ...
  6. PROFIT (builds on CI started to run 2-3 times faster)
JLarky
  • 9,833
  • 5
  • 36
  • 37