Skip to content

Commit 1aaf470

Browse files
committed
vue: @module-federation/utilities dependency is gateway only
1 parent eb88652 commit 1aaf470

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

generators/vue/generator.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,19 +238,25 @@ export default class VueGenerator extends BaseApplicationGenerator {
238238
});
239239
}
240240
},
241-
addMicrofrontendDependencies({ application, source }) {
242-
const { clientBundlerVite, clientBundlerWebpack, enableTranslation, microfrontend } = application;
241+
addMicrofrontendDependencies({ application }) {
242+
const { applicationTypeGateway, clientBundlerVite, clientBundlerWebpack, enableTranslation, microfrontend } = application;
243243
if (!microfrontend) return;
244244
if (clientBundlerVite) {
245-
source.mergeClientPackageJson!({
245+
this.packageJson.merge({
246246
devDependencies: {
247247
'@originjs/vite-plugin-federation': '1.3.6',
248248
},
249249
});
250250
} else if (clientBundlerWebpack) {
251-
source.mergeClientPackageJson!({
251+
if (applicationTypeGateway) {
252+
this.packageJson.merge({
253+
devDependencies: {
254+
'@module-federation/utilities': null,
255+
},
256+
});
257+
}
258+
this.packageJson.merge({
252259
devDependencies: {
253-
'@module-federation/enhanced': null,
254260
'browser-sync-webpack-plugin': null,
255261
'copy-webpack-plugin': null,
256262
'css-loader': null,

0 commit comments

Comments
 (0)