diff --git a/packages/lib/src/index.ts b/packages/lib/src/index.ts index 13344f64..bdd992b7 100644 --- a/packages/lib/src/index.ts +++ b/packages/lib/src/index.ts @@ -45,19 +45,19 @@ export default function federation( let registerCount = 0 function registerPlugins(mode: string, command: string) { - if (mode === 'development' || command === 'serve') { - pluginList = [ - devSharedPlugin(options), - devExposePlugin(options), - devRemotePlugin(options) - ] - } else if (mode === 'production' || command === 'build') { + if (mode === 'production' || command === 'build') { pluginList = [ prodSharedPlugin(options), prodExposePlugin(options), prodRemotePlugin(options) ] - } else { + } else if (mode === 'development' || command === 'serve') { + pluginList = [ + devSharedPlugin(options), + devExposePlugin(options), + devRemotePlugin(options) + ] + } else { pluginList = [] } builderInfo.isHost = !!(