Skip to content

Commit

Permalink
updated hrms configs
Browse files Browse the repository at this point in the history
  • Loading branch information
nipunarora-eGov committed Mar 6, 2024
1 parent 313f194 commit a013e39
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 15 deletions.
2 changes: 1 addition & 1 deletion micro-ui/web/packages/hrms/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN yarn cache clean
# Install dependencies
RUN yarn install

RUN yarn add @digit-ui/[email protected]
# RUN yarn add @digit-ui/[email protected]

# Copy the rest of the application
COPY . .
Expand Down
1 change: 0 additions & 1 deletion micro-ui/web/packages/hrms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
39 changes: 26 additions & 13 deletions micro-ui/web/packages/hrms/webpack.prod.js
Original file line number Diff line number Diff line change
@@ -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);

}
};

0 comments on commit a013e39

Please sign in to comment.