webpack tree-shaking removes necessary code from the bundle
The default handling of js modules changed from transpiling them to commonjs in babel 6 to keeping them as es6 modules in babel 7.
Webpack 3 knows how to tree-shake (i.e. remove unused code) es6 modules, but not commonjs modules.
The unfortunate outcome for us here is that all functions that weren’t used by core got removed from the core bundle when foreman gets built. This includes, in this case, propsToSnakeCase which was only used by katello and not in core. However, when katello gets built, these functions don’t get tree-shaken out, resulting in katello js code expecting the function to be available in the core bundle (using a very descriptive name such as W.e). However, since the missing function was removed, the uglification resulted in a different function being assigned to W.e, meaning that when katello tries to call it, it actually triggers a different function, in this case translateObject, which obviously fails as it is used for something completely different.