angular-architects / module-federation-plugin

MIT License
735 stars 203 forks source link

require() of ES Module federation.config.js from load-federation-config.js not supported. #537

Open its-dibo opened 7 months ago

its-dibo commented 7 months ago

error:

require() of ES Module app/federation.config.js from node_modules/@softarc/native-federation/src/lib/core/load-federation-config.js not supported.

federation.config.js

import {
  shareAll,
  withNativeFederation,
} from "@angular-architects/native-federation/config";

export default withNativeFederation({
  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
  ],
});

env node v20 npm v

dependencies" ``` "dependencies": { "@angular/animations": "^17.0.0", "@angular/cdk": "^17.0.0", "@angular/common": "^17.0.0", "@angular/compiler": "^17.0.0", "@angular/core": "^17.0.0", "@angular/forms": "^17.0.0", "@angular/material": "^17.0.0", "@angular/platform-browser": "^17.0.0", "@angular/platform-browser-dynamic": "^17.0.0", "@angular/platform-server": "^17.0.0", "@angular/router": "^17.0.0", "@angular/service-worker": "^17.0.0", "@angular/ssr": "^17.0.0", "@angular-architects/module-federation": "^17.0.0", "@ngx-formly/core": "^6.2.2", "@ngx-formly/material": "^6.2.2", "express": "^4.18.2", "http-proxy": "^1.18.1", "ngx-quill": "^24.0.4", "rxjs": "~7.8.1", "tslib": "^2.6.2", "zone.js": "~0.14.2", "es-module-shims": "^1.5.12" }, "devDependencies": { "@angular-devkit/build-angular": "^17.0.0", "@angular-devkit/core": "^17.0.0", "@angular-devkit/schematics": "^17.0.0", "@angular/cli": "^17.0.0", "@angular/compiler-cli": "^17.0.0", "@nx/angular": "18.2.4", "@nx/workspace": "18.2.4", "@schematics/angular": "^17.0.0", "@types/express": "^4.17.21", "@types/jasmine": "~5.1.4", "@types/node": "^20.10.4", "jasmine-core": "~5.1.1", "karma": "~6.4.2", "karma-chrome-launcher": "~3.2.0", "karma-coverage": "~2.2.1", "karma-jasmine": "~5.1.0", "karma-jasmine-html-reporter": "~2.1.0", "nx": "18.2.4", "typescript": "~5.2.2" }, ```

`

ZissisT commented 1 month ago

Any news on this?