Skip to content
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

Merged
merged 3 commits into from
Feb 3, 2023
Merged

ENDOC-646 define asset paths MFE & EPC #674

merged 3 commits into from
Feb 3, 2023

Conversation

jyunmitch
Copy link
Collaborator

No description provided.


* For widgets: `window.entando?.widgets['YOUR-MFE']?.basePath;`

* For EPCs: `window.entando?.epc['simple-mfe']?.basePath;`
Copy link
Member

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.
Copy link
Member

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).
Copy link
Member

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:
Copy link
Member

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).
Copy link
Member

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).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instructions for (not "on")

Copy link
Collaborator Author

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).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for (not "on")

@jyunmitch jyunmitch merged commit d13a7bf into main Feb 3, 2023
@jyunmitch jyunmitch deleted the ENDOC-646 branch February 3, 2023 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants