diff --git a/micro-ui/web/packages/hrms/docker/Dockerfile b/micro-ui/web/packages/hrms/docker/Dockerfile index f9c45e49378..18d48e15085 100644 --- a/micro-ui/web/packages/hrms/docker/Dockerfile +++ b/micro-ui/web/packages/hrms/docker/Dockerfile @@ -17,7 +17,7 @@ RUN yarn cache clean # Install dependencies RUN yarn install -RUN yarn add @digit-ui/digit-ui-module-core-base@1.0.8 +# RUN yarn add @digit-ui/digit-ui-module-core-base@1.0.8 # Copy the rest of the application COPY . . diff --git a/micro-ui/web/packages/hrms/package.json b/micro-ui/web/packages/hrms/package.json index 2dfb64a5dd1..9e5b4457e4f 100644 --- a/micro-ui/web/packages/hrms/package.json +++ b/micro-ui/web/packages/hrms/package.json @@ -30,7 +30,6 @@ "rxjs": "6.6.3", "@digit-ui/digit-ui-libraries-mfe": "1.0.6", "@egovernments/digit-ui-react-components":"1.4.106", - "@digit-ui/digit-ui-module-core-base":"1.0.8", "react-hook-form": "6.15.8", "react-i18next": "11.16.2", "react-query": "3.6.1", diff --git a/micro-ui/web/packages/hrms/webpack.prod.js b/micro-ui/web/packages/hrms/webpack.prod.js index 875fec5b04c..0310ca8e471 100644 --- a/micro-ui/web/packages/hrms/webpack.prod.js +++ b/micro-ui/web/packages/hrms/webpack.prod.js @@ -1,27 +1,40 @@ -const { merge } = require("webpack-merge"); -const ModuleFederationPlugin = require("webpack/lib/container/ModuleFederationPlugin"); -const commonConfig = require("./webpack.common"); -const packageJson = require("./package.json"); +const { merge } = require('webpack-merge'); +const ModuleFederationPlugin = require('webpack/lib/container/ModuleFederationPlugin'); +const commonConfig = require('./webpack.common'); +const packageJson = require('./package.json'); module.exports = () => { const prodConfig = { - mode: "production", + mode: 'production', output: { - publicPath: "/hrms-ui/", - filename: "[name].[contenthash].js", + publicPath: '/hrms-ui/', + filename: '[name].[contenthash].js', }, plugins: [ new ModuleFederationPlugin({ - name: "hrms", - filename: "remoteEntry.js", + name: 'hrms', + filename: 'remoteEntry.js', exposes: { - "./HRMSModule": "./src/SingleSpaEntry", + './HRMSModule': './src/SingleSpaEntry', + }, + shared: { + 'single-spa-react': '^4.6.1', + 'react': '17.0.1', + 'react-dom': '17.0.1', + 'react-router-dom': '5.2.0', + 'rxjs': '6.6.3', + 'react-hook-form': '6.15.8', + 'react-i18next': '11.16.2', + 'react-query': '3.6.1', + 'rooks': '^4.4.0', + 'webpack': '^5.68.0', + 'webpack-cli': '^4.9.2', + 'webpack-dev-server': '^4.8.1', + 'webpack-merge': '5.7.3', }, - // shared: packageJson.dependencies, //removed the shared logic for now will be enabled later for optimization }), ], }; return merge(commonConfig, prodConfig); - -} +};