The way ruby 6 configs webpack is via the webpacker gem which in turn uses it's own custom config file webpacker.yml. While this is approachable it's become a bit of a headache to map between this config and the much more extensive online documentation for webpack which assumes you are using a js based config. Also, it doesn't allow moving to webpack 5.
How would I take a rails project setup to use the webpacker gem and transition to using a javascript based webpack config, e.g., so I could upgrade to webpack 5?
I'm willing to run webpack manually on each file change if doing this breaks the automatic recompilation.