Description
Hi,
I recently created a new project by running rails my_app --css=bootstrap
I was then surprised that it choose bun as the javscript bundler. After some investigation I found out the reason it does is because of a recent PR #130 which checks for two things:
- bun is in the path
- There is no yarn.lock file
By a coincidence I had bun in the path, and there is no yarn.lock file since it is a new project. Btw, I also have yarn in my path, so it selected bun over yarn even though both are available. This caused some issues down the road because bun was not supported by my hosting solution, probably because bun is fairly new.
Was bun selected as a default on purpose in #130 or was it an unintended consequence? I also see that #138 suggests adding npm as well, what will be the ordering then?
If bun is the preferred default, I would suggest adding a paragraph to the readme about it to avoid surprises. Happy to create a documentation PR for this if this is the case.
It might also make sense to allow the user to select bundler in other ways than "touch yarn.lock" or fiddling with the PATH, especially when cssbundling is used through rails new