DEV Community

Discussion on: Micro frontends with Feature Hub

Collapse
 
andreshmosqueda profile image
AndresHMosqueda • Edited

How can I define a service inside "featureServiceDefinitions: []" that is being loaded from a remote location?

As I'm getting:

**The Feature App module at the url "localhost:3004/myFeatureApp.js" has been successfully loaded.

index.js:1 Error: The required Feature Service "test:hello-service" is not registered and therefore could not be bound to consumer "test:hello-component".**

My code:

defineExternals({
react: React,
});
const { featureAppManager } = createFeatureHub("test:container-integrator", {
featureServiceDefinitions: [],
moduleLoader: loadAmdModule,
providedExternals: { react: "16.8.6", "@feature-hub/react": "2.8.1" },
});