-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENDOC-646 define asset paths MFE & EPC #674
Conversation
|
||
* For widgets: `window.entando?.widgets['YOUR-MFE']?.basePath;` | ||
|
||
* For EPCs: `window.entando?.epc['simple-mfe']?.basePath;` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
simple-mfe -> YOUR-EPC
@@ -184,6 +185,16 @@ See the [Plugin Environment Variables](../../tutorials/devops/plugin-environment | |||
} | |||
] | |||
``` | |||
#### Configure a Path for Static Assets | |||
To configure your micro frontend with access to static assets, Entando provides two paths, one for widgets and another for EPCs, defined in a custom element. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove "defined in a custom element". This is about micro frontends and isn't connected to HTML custom elements per se.
|
||
* For EPCs: `window.entando?.epc['simple-mfe']?.basePath;` | ||
|
||
[See instructions on configuring a custom element](../../tutorials/create/mfe/react.md#configure-the-custom-element). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See instructions on configuring a custom element -> See instructions on setting the path in a React MFE.
@@ -65,7 +65,12 @@ bundle-project/ | |||
customElement: my-widget-config # The name of the custom element used to render the configUi | |||
resources: | |||
- <bundleid>/static/js/main.js # The resources necessary for the custom element to render the configUI, like the code | |||
<!-- check line 65 after static resource issue is resolved--> | |||
|
|||
**Note**: To configure micro frontends to access static assets, Entando provides a path to be set in a custom element with the following snippet: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove "in a custom element"
``` js | ||
window.entando?.widgets['simple-mfe']?.basePath; | ||
``` | ||
[See instructions on configuring a custom element](../../tutorials/create/mfe/react.md#configure-the-custom-element). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See instructions on configuring a custom element -> See instructions on setting the path in a React MFE.
``` js | ||
window.entando?.widgets['simple-mfe']?.basePath; | ||
``` | ||
[See instructions on setting the path in a React MFE](../../tutorials/create/mfe/react.md#configure-the-custom-element). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instructions for (not "on")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are both correct but the different contexts for each are really subtle. 'For' seems to be used more and more often in specific task oriented contexts, like here. But it can be argued the other way too. Very confusing.
|
||
* For EPCs: `window.entando?.epc['YOUR-EPC']?.basePath;` | ||
|
||
[See instructions on setting the path in a React MFE](../../tutorials/create/mfe/react.md#configure-the-custom-element). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for (not "on")
No description provided.