-
Notifications
You must be signed in to change notification settings - Fork 64
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
Implement RemoteView #2284
Implement RemoteView #2284
Conversation
🦋 Changeset detectedLatest commit: dda5fae The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
||
node.insertAdjacentHTML( | ||
'beforeend', | ||
`<link rel='stylesheet' href='${url}' />`, |
Check warning
Code scanning / CodeQL
Unsafe HTML constructed from library input
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.
Regarding this, we've added a security note to the docs, plus the code.
does need to be used responsibly, and developers should ensure they only load ESM Views from trusted sources
@sgb-io I moved the base to feature/v4.1 |
I think you need to build |
Implement the RemoteView package
Extracts the
<RemoteView />
component from the Modular Microfrontends demo into a new library@modular-scripts/remote-view
.View the new docs at
packages/remote-view/README.md
.What is different vs the existing demo?
remote-view-demos
, which acts as a showcase and contains useful examples for consumersWhat is the contents?
remote-view
packageremote-view-demos
package - storybook-like showcase of various examples of using<RemoteView />
remote-view-fake-cdn
contains the 4 example ESM Views, pre-built, plus react/react-dom as they would be exposed on esm.sh. This allows us to fully test<RemoteView />
without a dependency on esm.sh (or other esm CDN). Unfortunately it's 12k lines tracked in the repo, but it's all contained within__fixtures__
.TODO
remote-view-fake-cdn
. Maybe move this into a readme that is local to the fixture. Also, document how to use the component in local dev via another esm-view