I am encountering an issue when trying to expose routes and components in my Native Federation configuration. Here’s the relevant part of my federation.config.js:
When building the federation artifacts, I receive the following errors:
INFO Building federation artifacts
X [ERROR] Could not resolve "./src/app/app.routes.ts"
X [ERROR] Could not resolve "./src/app/app.component.ts"
Did you try to change the path to something like:
exposes: { './Component': './projects/todo/src/app/app.component.ts', }
./projects//src/app/app.component.ts
For which library do you need help?
native-federation
Question
I am encountering an issue when trying to expose routes and components in my Native Federation configuration. Here’s the relevant part of my federation.config.js:
''' const { withNativeFederation, shareAll, } = require("@angular-architects/native-federation/config");
module.exports = withNativeFederation({ name: "MFE1",
exposes: { "./Component": "./src/app/app.component.ts", "./routes": "./src/app/app.routes.ts", },
shared: { ...shareAll({ singleton: true, strictVersion: true, requiredVersion: "auto", }), },
skip: [ "rxjs/ajax", "rxjs/fetch", "rxjs/testing", "rxjs/webSocket", // Add further packages you don't need at runtime ],
// Please read our FAQ about sharing libs: // https://shorturl.at/jmzH0 }); '''
When building the federation artifacts, I receive the following errors: INFO Building federation artifacts X [ERROR] Could not resolve "./src/app/app.routes.ts" X [ERROR] Could not resolve "./src/app/app.component.ts"
Angular version: 18 Native Federation version: 18.2.2