https://shaneosullivan.wordpress.com/2023/05/17/using-bun-js-as-a-bundler/ Skip to content [abaeb4f714] SOS Shane O'Sullivan's technical blog... really ties the room together Using Bun.js as a bundler Shane O'Sullivan Technical May 17, 2023May 17, 2023 4 Minutes Bun.js is a new (as of 2023) JavaScript runtime that is still very much in development, with it's primary focus being on extreme speed. I've been following it for a while but until today haven't had a good excuse to use it. The author, Jarred Sumner, announced on Twitter today that they have shipped a beta version of a new code bundler for Bun, showing some crazy speed increases over other bundlers. This piqued my interest, as I use a combination of Webpack, Browserify and Uglify on my side projects, in this case my tablet PWA that I built for my kids kidzfun.art, which work but are really slow. Introducing the Bun Bundler A fast JavaScript bundler deeply integrated into Bun's runtime https://t.co/mGPXr0cv7f -- Jarred Sumner (@jarredsumner) May 16, 2023 My current workflow can result in a 5 - 7 second wait for all my JS files to rebuild when I save a file, and I thought that Bun could help with this. It turns out I was right! .... with caveats. You can see the docs for Bun.build() at https://bun.sh/docs/cli/build , and they are well written and quite comprehensive. My requirements were to * Build multiple files quickly, each of which imports multiple other 3rd party files from node_modules. * Build minified and non-minified files * The resulting file can be included directly in a browser using a