single-spa-angular-cli
single-spa-angular-cli copied to clipboard
Build and Deployment.
Thank you for the awesome work.
When I run the project as it is, It's working fine.
But the same code I just build and deployed in my server with different folders (Container app in the root folder and others in their app folder) :
- Child1 into ./child1/
- Child2 into ./child2/
- Container into ./
for this method, I'm getting the following error.
ERROR Error: Uncaught (in promise): ReferenceError: parcel 'parcel-0' died in status BOOTSTRAPPING: regeneratorRuntime is not defined ReferenceError: regeneratorRuntime is not defined at bootstrap (single-spa-angular.js:120) at single-spa.min.js:2 at ZoneDelegate.invoke (zone-evergreen.js:364) at Object.onInvoke (core.js:41654) at ZoneDelegate.invoke (zone-evergreen.js:363) at Zone.run (zone-evergreen.js:123) at zone-evergreen.js:857 at ZoneDelegate.invokeTask (zone-evergreen.js:399) at Object.onInvokeTask (core.js:41632) at ZoneDelegate.invokeTask (zone-evergreen.js:398) at resolvePromise (zone-evergreen.js:798) at resolvePromise (zone-evergreen.js:750) at zone-evergreen.js:860 at ZoneDelegate.invokeTask (zone-evergreen.js:399) at Object.onInvokeTask (core.js:41632) at ZoneDelegate.invokeTask (zone-evergreen.js:398) at Zone.runTask (zone-evergreen.js:167) at drainMicroTaskQueue (zone-evergreen.js:569) at ZoneTask.invokeTask [as invoke] (zone-evergreen.js:484)
Hi there,
This example uses SystemJS + import-maps to load the micro-apps. Take a look at the import-map.json file in /container/src/assets. After you deploy, the import map file should reflect wherever the built and deployed main.js files are being hosted. For example, lets say you build child1 and put it in an s3 bucket with the following public url: https://my-bucket.s3.us-east-1.amazonaws.com/child1/main.js. This is URL should be set in the import-map file used in the deployed container app.
The deploy pipeline is not covered in this example repo, but the way my deploys work is they would build the child app, upload it to a new versioned public location (s3 bucket), and then set the new location in a shared configuration service that the container app references (for example kubernetes config-map or Hashicorp Consul). You will probably need to host the import-map.json file on a server instead of putting it in /assets like this example does. If done correctly, you will be able to deploy the child apps individually, without deploying the container app, and users will seamlessly receive the child-app updates.
Thank you.