Converting from Custom Webpack Config to Rails Webpacker Config
Compare your package.json and the dependencies in https://github.com/rails/webpacker/blob/master/package.json
and avoid any duplicates. We don't want different versions of the same packages.
We want the versions from rails/webpacker unless we specifically want to override them.
Search the rails/webpacker repo for anything you're not sure about in terms of package names.
run bin/webpacker and make sure there are zero errors
update webpack plugins and loaders to current or close to current