Skip to content

Commit

Permalink
fix: html
Browse files Browse the repository at this point in the history
  • Loading branch information
MadaraUchiha-314 committed Dec 4, 2023
1 parent 0098af1 commit 03e31f9
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions packages/examples/project-a/public/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<html>
<head>
<title>Module Federation Experiments</title>
<script type="module">
<script type="module" id="example-code">
const sharedScope = {
/**
* In the base-example, we have declared uuid as import: false
Expand Down Expand Up @@ -43,13 +43,34 @@
const pqr = (await container.get('./pqr'))();
console.log('exposed module ./pqr', pqr);
</script>
<style>
pre {
border: solid;
text-wrap: wrap;
}
.container {
display: flex;
}
.inner-container {
margin: 10px 10px 10px 10px;
}
</style>
</head>
<body>
<h3>View page source to see what's happening</h3>
<h3>Open JS console to see logs.</h3>
<h4>
Type globalThis.shareScope in the JS console to check the current state of
shared scope object.
</h4>
<div class="container">
<div class="inner-container">
<h4>Check the page source or code below to see what's happening</h4>
<pre id="example-code-preview" />
</div>
</div>
</body>
<script>
document.getElementById('example-code-preview').innerHTML =
document.getElementById('example-code').innerHTML;
</script>
</html>

1 comment on commit 03e31f9

@vercel
Copy link

@vercel vercel bot commented on 03e31f9 Dec 4, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.