-
-
Notifications
You must be signed in to change notification settings - Fork 374
Closed as not planned
Labels
Description
Describe the bug
It appears that types are not working correctly for beforePreloadRemote in a runtime plugin. When implementing the hook in a plugin like so:
@module-federation/enhanced v0.1.13import type { FederationRuntimePlugin } from '@module-federation/enhanced/runtime';
const runtimePlugin: () => FederationRuntimePlugin = function () {
return {
name: 'my-runtime-plugin',
async beforePreloadRemote(args) {
//args here is of type any
console.log(args);
return args;
},
};
};
export default runtimePlugin;It appears that "args" being passed into "beforePreloadRemote" is any. The object names are also not correct, intelisense picks them up as "preloadOps" but it is actually "preloadOptions".
Reproduction
Used Package Manager
npm
System Info
@module-federation/enhanced v0.1.13
VSCode
Typescript 5.4.4Validations
- Read the docs.
- Read the common issues list.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Module federation issue and not a framework-specific issue.
- The provided reproduction is a minimal reproducible example of the bug.