Bun Code Splitting with Rails Propshaft

I wanted to code-split a React component out of my Rails 8 app’s JavaScript bundle. The app uses Bun for JS bundling and Propshaft for asset serving. Unfortunately, both fingerprint chunked javascript assets breaking dynamic imports. Here’s how to configure Bun to work with Propshaft.