When upgrading from Webpacker v5 to Shakapacker v6+, you might want to change the module setting from commonjs to auto. Why?
module
commonjs
auto