Skip to content

Commit

Permalink
try with window.location.origin
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Oct 24, 2023
1 parent 3fc5844 commit 2d08ba7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import type NavbarItem from 'app/layouts/navbar/navbar-item.model';
export const loadNavbarItems = async (service: string): Promise<NavbarItem[]> =>
importRemote<{ EntityNavbarItems: NavbarItem[] }>({
esm: true,
url: `./services/${service}/remoteEntry.js`,
url: `${window.location.origin}/services/${service}/remoteEntry.js`,
scope: 'default',
module: 'entity-navbar-items',
}).then(({ EntityNavbarItems }) => EntityNavbarItems);
Expand All @@ -33,7 +33,7 @@ export const loadNavbarItems = async (service: string): Promise<NavbarItem[]> =>
export const loadTranslationModule = async (service: string): Promise<Type<any>> =>
importRemote<{ LazyTranslationModule: Type<any> }>({
esm: true,
url: `./services/${service}/remoteEntry.js`,
url: `${window.location.origin}/services/${service}/remoteEntry.js`,
scope: 'default',
module: 'translation-module',
}).then(({ LazyTranslationModule }) => LazyTranslationModule);
Expand All @@ -42,7 +42,7 @@ export const loadTranslationModule = async (service: string): Promise<Type<any>>
export const loadEntityModule = async (service: string): Promise<Type<any>> =>
importRemote<{ EntityRoutingModule: Type<any> }>({
esm: true,
url: `./services/${service}/remoteEntry.js`,
url: `${window.location.origin}/services/${service}/remoteEntry.js`,
scope: 'default',
module: 'entity-routing',
}).then(({ EntityRoutingModule }) => EntityRoutingModule);
2 changes: 2 additions & 0 deletions generators/angular/templates/tsconfig.json.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
"useDefineForClassFields": false,
"target": "es2022",
"module": "es2020",
<%_ if (microfrontend) { _%>
"skipLibCheck": true,
<%_ } _%>
"types": [],
"lib": ["es2018", "es2020", "dom"]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ module.exports = (config, options, targetOptions) => {
},
resolve: {
fallback: {
// Workaround https://github.com/module-federation/universe/issues/1575
path: false,
},
},
Expand Down

0 comments on commit 2d08ba7

Please sign in to comment.