You can see the various files added in this gist to really do the bulk of the work.
The important bits seem to be:
yarn add esbuild-sass-plugin
Add a new esbuild config file somewhere and update your package.json script to use that new file (I used app/assets/config/esbuild.js)
Add to package.json (replace the previous build script if one is present!):
"scripts": {
"build": "node app/assets/config/esbuild.js"
},
Then, I removed the app/assets/stylesheets/application.css and added an empty .keep file in its place
- Add the nodejs buildpack before the ruby buildpack
heroku buildpacks:add heroku/nodejs -i 1
- I had to ensure I had a app/assets/stylesheets/ director with a .keep file.
- I ensured my manifest.js in app/assets/config looked like
//= link_tree ../images
//= link_directory ../stylesheets .css
//= link_tree ../builds
Far better than any other option currently available.