Fixes #37819 - Remove @theforeman/builder usage
Moving it into foreman from foreman-js.
I saw it being used in some plugins and I think it can be removed from them, if they run npm test and webpack compilation goes without errors for them (for example: REX).
Other plugins can stop using builder as well and import from core directly, for example, in Katello:
const { foremanLocation } = require('@theforeman/find-foreman');
module.exports = {
presets: [foremanLocation()+'/webpack/babel'],
};
Also updated babel & babal-preset-env, all the plugins that are in the babel config are already in preset-env new version so no need to move them ('@babel/plugin-proposal-class-properties' '@babel/plugin-proposal-object-rest-spread' '@babel/plugin-proposal-optional-chaining' '@babel/plugin-transform-object-assign' '@babel/plugin-syntax-dynamic-import' '@babel/plugin-syntax-optional-chaining')
Need to fix the imports yeah, thanks!
@theforeman/packaging I'm assuming https://github.com/theforeman/foreman-packaging/pull/11257 will make rpm-build happy?