debian-image-builder-frontend/config/prod.webpack.config.js
regexowl 5b56f09e27 ESLint: Merge .js and .ts configs to one file
Since our code base is now mostly TypeScript, we can merge the configs and have a unified one.

`@typescript-eslint/no-var-requires` was temporarily disabled in webpack configs. These files will be replaced by fec.config.ts in the foreseeable future together with their ESLint override.
2024-06-19 13:13:29 +02:00

26 lines
696 B
JavaScript

/* eslint-disable @typescript-eslint/no-var-requires */
const { resolve } = require('path');
const config = require('@redhat-cloud-services/frontend-components-config');
const { config: webpackConfig, plugins } = config({
rootFolder: resolve(__dirname, '../'),
sassPrefix: '.imageBuilder',
});
plugins.push(
require('@redhat-cloud-services/frontend-components-config/federated-modules')(
{
root: resolve(__dirname, '../'),
exposes: {
'./RootApp': resolve(__dirname, '../src/AppEntry.tsx'),
},
shared: [{ 'react-router-dom': { singleton: true } }],
exclude: ['react-router-dom'],
}
)
);
module.exports = {
...webpackConfig,
plugins,
};