angular-architects / module-federation-plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

versioning and environments for `federation.manifest.json`

kryshac opened this issue · comments

@manfredsteyer hi again, sorry to bother you with a lot of questions, but what do you think if we move the content federation.manifest.json in environments or similar file to environments implementation.

I see two advantages to this:

  1. we will have a cache for federation.manifest.json with versioning so that it will be directly in main.js
  2. it will be easier with different environments

I've developed an implementation for environments, structured as follows:

root
  └── projects
      └── app
          └── src
              ├── assets
              │     └── federation.manifest.json
              └── federation
                  ├── development
                  │    └── federation.manifest.json
                  ├── production
                  │    └── federation.manifest.json
                  └── staging
                       └── federation.manifest.json
...
"assets": [
  "projects/app/src/favicon.ico",
  "projects/app/src/assets",
  {
    "glob": "federation.manifest.json",
    "input": "projects/app/src/federation/production",
    "output": "/assets/"
  }
]
...

because assets does not allow you to rename files, this entire structure must be nested, that's why I think it will be easier to implement with fileReplacements than with assets