-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
outdatedscope: angularIssues related to Angular support in NxIssues related to Angular support in Nxtype: feature
Description
- I'd be willing to implement this feature (contributing guide)
Description
I would like to add an optional argument with remoteEntryName to 2 functions:
loadRemoteModule and loadRemoteContainer from packages/angular/mf/mf.ts
At the moment, the value is hard-coded here:
...
const containerUrl = `${remoteUrl}${
remoteUrl.endsWith('/') ? '' : '/'
}remoteEntry.mjs`;
...
Motivation
Due to the nature of dynamic imports, this function will only try to fetch remoteEntry file once (regardless if it's success or error):
(tc39/proposal-dynamic-import#80)
function loadModule(url: string) {
return import(/* webpackIgnore:true */ url);
}
If user encounters temporary connection issues, then they will have to refresh the entire page to load the module, as there is no way to implement retriability (for example by importing the same file again with different query parameters)
Suggested Implementation
async function loadRemoteContainer(remoteName: string, remoteEntryName = 'remoteEntry.mjs')
Coly010
Metadata
Metadata
Assignees
Labels
outdatedscope: angularIssues related to Angular support in NxIssues related to Angular support in Nxtype: feature