Closed KevinNorth closed 8 months ago
I successfully monkey-patched jsbundling-rails to use pnpm in a project I'm working on, so I have some ideas on how this could be implemented. If you think this feature request is a good idea, I would be happy to put together a pull request for it!
yes pleas create a PR, I would like to use npm too instead of yarn
Same request in the cssbundling-rails repo too https://github.com/rails/cssbundling-rails/issues/138
fwiw I recently created package_json
to facilitate this, which is in the process of being landed in Shakapacker.
You can follow that here, and we've also got it working in our rails-template
across the five main package managers (npm, pnpm, yarn classic, yarn berry, and bun).
My understanding is that jsbundling-rails
is primarily only using package managers in its install templates and it looks like a single build call in a rake task that should be easy to customize per app so I wasn't going to look at suggesting package_json
here until after Shakapacker has been switched over in a new major and proven stable for a while, but if folks are already interested and open to it here I'm happy to help with its integration :)
Hello! Thanks for the encouragement to pursue this. I'm going to be busy on a higher-priority project for a little while. But I'll plan to come back to this and hopefully have a PR up by the end of the year or early next year.
I'll definitely look into your contributions when I do so, G-Rath!
If I understand correctly, jsbundling-rails is hard-coded to use yarn. Can this please be changed to allow consumers to specify their preferred Node package manager?