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 Dec 4, 2024
1 parent eb88652 commit 1aaf470
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions generators/vue/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,19 +238,25 @@ export default class VueGenerator extends BaseApplicationGenerator {
});
}
},
addMicrofrontendDependencies({ application, source }) {
const { clientBundlerVite, clientBundlerWebpack, enableTranslation, microfrontend } = application;
addMicrofrontendDependencies({ application }) {
const { applicationTypeGateway, clientBundlerVite, clientBundlerWebpack, enableTranslation, microfrontend } = application;
if (!microfrontend) return;
if (clientBundlerVite) {
source.mergeClientPackageJson!({
this.packageJson.merge({
devDependencies: {
'@originjs/vite-plugin-federation': '1.3.6',
},
});
} else if (clientBundlerWebpack) {
source.mergeClientPackageJson!({
if (applicationTypeGateway) {
this.packageJson.merge({
devDependencies: {
'@module-federation/utilities': null,
},
});
}
this.packageJson.merge({
devDependencies: {
'@module-federation/enhanced': null,
'browser-sync-webpack-plugin': null,
'copy-webpack-plugin': null,
'css-loader': null,
Expand Down

0 comments on commit 1aaf470

Please sign in to comment.