Skip to content

Resolve "Configure the url of module federation"

Closes #34 (closed)

env.prod and deployment

This PR proposes to set the federation URL in the config file via vite env variables. So the variables are being overrided from:

  • .env
  • .env.prod (if exists)
  • process variables if any (or gitlab CI variables)

This allows to have a prod enviroment so someone can launch the app locally pointing to the prod database and localhost (federation modules) but when it is deployed some variables will be overrided but the configured variables in the CI.

Example .env.prod federation section:

# MODULE FEDERATION
VITE_FEDERATION_DATASET_VIEWER_URL="http://localhost:3004/assets/remoteEntry.js"
VITE_FEDERATION_CRYOET_URL="http://localhost:3003/assets/remoteEntry.js"
VITE_FEDERATION_LOGISTICS_URL="http://localhost:3002/assets/remoteEntry.js"
VITE_FEDERATION_SESSION_VIEWER_URL="http://localhost:3001/assets/remoteEntry.js"

These variables can be overwritten if declared as variables: image

preview

The preview tasks have been moved to the preview stage. There are launched only manually. image

Edited by Alejandro De Maria Antolinos

Merge request reports

Loading