single spa angular i18n files are not loaded in Angular 9

1.6k views Asked by At

I am creating micro frontend angular application using single spa.How can i load i18n files from assets folder.

I have followed the instructions from : https://single-spa.js.org/docs/ecosystem-angular/

Angular Version : 9.1.12

Single spa : 4

single spa angular: 4.4.2

enter image description here

Do we need to add some additional configuration in webpack so that it loads the i18n files from assets folder ?

1

There are 1 answers

0
abhy On BEST ANSWER

When you install single-spa library to your application, single-spa/assets-url.ts is generated. You need to import asset-url.ts in your component and pass the path of i18n file in assetUrl method so that it will be available when you run the application.