Skip to content

Commit

Permalink
vue: @module-federation/utilities dependency is gateway only
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Oct 7, 2024
1 parent 8ddf7a1 commit c3ef1d2
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions generators/vue/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,17 +205,24 @@ export default class VueGenerator extends BaseApplicationGenerator {
}
},
addMicrofrontendDependencies({ application }) {
if (!application.microfrontend) return;
if (application.clientBundlerVite) {
const { applicationTypeGateway, clientBundlerVite, clientBundlerWebpack, enableTranslation, microfrontend } = application;
if (!microfrontend) return;
if (clientBundlerVite) {
this.packageJson.merge({
devDependencies: {
'@originjs/vite-plugin-federation': '1.3.6',
},
});
} else if (application.clientBundlerWebpack) {
} else if (clientBundlerWebpack) {
if (applicationTypeGateway) {
this.packageJson.merge({
devDependencies: {
'@module-federation/utilities': null,
},
});
}
this.packageJson.merge({
devDependencies: {
'@module-federation/utilities': null,
'browser-sync-webpack-plugin': null,
'copy-webpack-plugin': null,
'css-loader': null,
Expand All @@ -234,7 +241,7 @@ export default class VueGenerator extends BaseApplicationGenerator {
'webpack-dev-server': null,
'webpack-merge': null,
'workbox-webpack-plugin': null,
...(application.enableTranslation
...(enableTranslation
? {
'folder-hash': null,
'merge-jsons-webpack-plugin': null,
Expand Down

0 comments on commit c3ef1d2

Please sign in to comment.