From 5db292d01f929d43f677319538343cd845a326af Mon Sep 17 00:00:00 2001 From: regexowl Date: Fri, 7 Aug 2026 13:01:52 +0200 Subject: [PATCH 1/5] fecConfig: Fix rule for excluding cockpit pkg directory The path was malformed, so this had no effect. The check is a bit defensive, but no harm in keeping it as a safeguard. --- fec.config.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fec.config.js b/fec.config.js index 7dbc15d914..7fdeea6fd5 100644 --- a/fec.config.js +++ b/fec.config.js @@ -119,9 +119,9 @@ module.exports = { { // running `make` on cockpit plugin creates './pkg' // directory, the generated files do not pass - // `npm run build` outputing failures - // this ensures the directory is exluded during build time - exclude: ',/pkg', + // `npm run build` outputting failures + // this ensures the directory is excluded during build time + exclude: path.resolve(__dirname, 'pkg'), }, ], }, From 9b94897d59119f12cf110ad04b9e08c38ee64fd6 Mon Sep 17 00:00:00 2001 From: regexowl Date: Fri, 7 Aug 2026 13:08:48 +0200 Subject: [PATCH 2/5] fecConfig: Remove deprecated /beta route `/beta` url was deprecated with the platform switching to preview. This was just never cleaned up. --- fec.config.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/fec.config.js b/fec.config.js index 7fdeea6fd5..bb52c51ffe 100644 --- a/fec.config.js +++ b/fec.config.js @@ -126,11 +126,6 @@ module.exports = { ], }, routes: { - ...(process.env.CONFIG_PORT && { - [`${process.env.BETA ? '/beta' : ''}/config`]: { - host: `http://localhost:${process.env.CONFIG_PORT}`, - }, - }), ...(process.env.LOCAL_IMAGE_BUILDER_API && { '/api/image-builder': { host: process.env.LOCAL_IMAGE_BUILDER_API, @@ -144,9 +139,6 @@ module.exports = { return { ...acc, [`/apps/${appName}`]: { host: `${protocol}://${host}:${appPort}` }, - [`/beta/apps/${appName}`]: { - host: `${protocol}://${host}:${appPort}`, - }, }; }, {}), }), From 61d24371c7a7a5941fdbddb73e49df143bc36d33 Mon Sep 17 00:00:00 2001 From: regexowl Date: Fri, 7 Aug 2026 13:13:20 +0200 Subject: [PATCH 3/5] fecConfig: Omit repetition This is just stylistic change, feels cleaner this way. --- fec.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fec.config.js b/fec.config.js index bb52c51ffe..b40ca9025b 100644 --- a/fec.config.js +++ b/fec.config.js @@ -143,7 +143,7 @@ module.exports = { }, {}), }), }, - plugins: plugins, + plugins, moduleFederation: { exposes: { './RootApp': path.resolve(__dirname, './src/AppEntry.tsx'), From df1e35687d0bc7758b32958dadcd28bdb7505bd7 Mon Sep 17 00:00:00 2001 From: regexowl Date: Fri, 7 Aug 2026 13:13:51 +0200 Subject: [PATCH 4/5] fecConfig: Fix typo ssia --- fec.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fec.config.js b/fec.config.js index b40ca9025b..6ec9a763a3 100644 --- a/fec.config.js +++ b/fec.config.js @@ -106,7 +106,7 @@ module.exports = { resolve: { alias: { '@': path.resolve(__dirname, 'src'), - // we don't wan't these packages bundled with + // we don't want these packages bundled with // the service frontend, so we can set the aliases // to false cockpit: false, From 2f886a696460370137631d70febf76d4e1263fc6 Mon Sep 17 00:00:00 2001 From: regexowl Date: Fri, 7 Aug 2026 13:27:25 +0200 Subject: [PATCH 5/5] fecConfig: Clean up add_define This removes the add_define plugin that was originally used for msw in browser. Since msw was deprecated and the helper was always hitting the `else` branch, we can just inline it now. --- fec.config.js | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/fec.config.js b/fec.config.js index 6ec9a763a3..f905202746 100644 --- a/fec.config.js +++ b/fec.config.js @@ -49,30 +49,12 @@ class IstanbulCoveragePlugin { const plugins = [new IstanbulCoveragePlugin()]; -function add_define(key, value) { - const definePluginIndex = plugins.findIndex( - (plugin) => plugin instanceof webpack.DefinePlugin, - ); - if (definePluginIndex !== -1) { - const definePlugin = plugins[definePluginIndex]; - - const newDefinePlugin = new webpack.DefinePlugin({ - ...definePlugin.definitions, - [key]: JSON.stringify(value), - }); - - plugins[definePluginIndex] = newDefinePlugin; - } else { - plugins.push( - new webpack.DefinePlugin({ - [key]: JSON.stringify(value), - }), - ); - } -} - if (process.env.NODE_ENV) { - add_define('process.env.NODE_ENV', process.env.NODE_ENV); + plugins.push( + new webpack.DefinePlugin({ + 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV), + }), + ); } if (process.env.ENABLE_SENTRY) {