Skip to content

Conversation

@MariaAga
Copy link
Member

@MariaAga MariaAga commented Sep 13, 2024

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')

@MariaAga MariaAga requested a review from a team as a code owner September 13, 2024 13:09
@github-actions github-actions bot added the UI label Sep 13, 2024
@MariaAga MariaAga force-pushed the remove-foreman-builder branch from da895e1 to ca27926 Compare September 13, 2024 15:24
loader: 'babel-loader',
options: {
presets: [require.resolve('@theforeman/builder/babel')],
presets: [require.resolve('../webpack/babel')],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In other places we always use __dirname. I'd prefer it if we were consistent and didn't rely on the current working directory too much. Perhaps we need a new const project_root = path.join(__dirname, '..') that can then be used everywhere.

@MariaAga
Copy link
Member Author

Need to fix the imports yeah, thanks!

@MariaAga MariaAga force-pushed the remove-foreman-builder branch from 3d299f7 to 370d14e Compare September 17, 2024 13:37
@MariaAga
Copy link
Member Author

@theforeman/packaging I'm assuming theforeman/foreman-packaging#11257 will make rpm-build happy?

@MariaAga MariaAga force-pushed the remove-foreman-builder branch from d65c93a to 979acb9 Compare September 17, 2024 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants