@@ -46,23 +46,29 @@ class FederationRuntimePlugin {
46
46
47
47
static getTemplate ( runtimePlugins : string [ ] , bundlerRuntimePath ?: string ) {
48
48
// internal runtime plugin
49
+ const normalizedBundlerRuntimePath = (
50
+ bundlerRuntimePath || BundlerRuntimePath
51
+ ) . replaceAll ( '\\' , '/' ) ;
52
+
49
53
let runtimePluginTemplates = '' ;
50
54
const runtimePLuginNames : string [ ] = [ ] ;
51
55
52
56
if ( Array . isArray ( runtimePlugins ) ) {
53
57
runtimePlugins . forEach ( ( runtimePlugin , index ) => {
54
58
const runtimePluginName = `plugin_${ index } ` ;
55
- const runtimePluginPath = path . isAbsolute ( runtimePlugin )
56
- ? runtimePlugin
57
- : path . join ( process . cwd ( ) , runtimePlugin ) ;
59
+ const runtimePluginPath = (
60
+ path . isAbsolute ( runtimePlugin )
61
+ ? runtimePlugin
62
+ : path . join ( process . cwd ( ) , runtimePlugin )
63
+ ) . replaceAll ( '\\' , '/' ) ;
58
64
59
65
runtimePluginTemplates += `import ${ runtimePluginName } from '${ runtimePluginPath } ';\n` ;
60
66
runtimePLuginNames . push ( runtimePluginName ) ;
61
67
} ) ;
62
68
}
63
69
64
70
return Template . asString ( [
65
- `import federation from '${ bundlerRuntimePath || BundlerRuntimePath } ';` ,
71
+ `import federation from '${ normalizedBundlerRuntimePath } ';` ,
66
72
runtimePluginTemplates ,
67
73
`${ federationGlobal } = {...federation,...${ federationGlobal } };` ,
68
74
`if(!${ federationGlobal } .instance){` ,
0 commit comments