Skip to content

Commit

Permalink
Update README instructions so Vite build works for HTML integration (#…
Browse files Browse the repository at this point in the history
…1439)

* add type="module" to example code

* 0.1.8 -> 0.2.0
  • Loading branch information
artursapek authored Jan 9, 2024
1 parent 592a377 commit ac07595
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ Include the wormhole connect

```html
<!-- include in <head> -->
<script src="https://www.unpkg.com/@wormhole-foundation/wormhole-connect@0.0.12/dist/main.js" defer></script>
<link rel="https://www.unpkg.com/@wormhole-foundation/wormhole-connect@0.0.12/dist/main.css" />
<script type="module" src="https://www.unpkg.com/@wormhole-foundation/wormhole-connect@0.2.0/dist/main.js" defer></script>
<link rel="https://www.unpkg.com/@wormhole-foundation/wormhole-connect@0.2.0/dist/main.css" />

<!-- include in <body> -->
<div id="wormhole-connect"></div>
Expand Down
9 changes: 5 additions & 4 deletions wormhole-connect-loader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ If you created a config from step 1, [stringify](https://developer.mozilla.org/e

```html
<!-- paste below into index.html body -->
<script src="https://www.unpkg.com/@wormhole-foundation/wormhole-connect@0.0.12/dist/main.js"></script>
<script type="module" src="https://www.unpkg.com/@wormhole-foundation/wormhole-connect@0.2.0/dist/main.js"></script>
<link
href="https://www.unpkg.com/@wormhole-foundation/wormhole-connect@0.0.12/dist/main.css"
href="https://www.unpkg.com/@wormhole-foundation/wormhole-connect@0.2.0/dist/main.css"
/>
```

Expand All @@ -156,12 +156,13 @@ Note that the `wormhole-connect` div with your config has to be present _before_
function mount() {
const script = document.createElement("script");
script.src =
"https://www.unpkg.com/@wormhole-foundation/wormhole-connect@0.0.12/dist/main.js";
"https://www.unpkg.com/@wormhole-foundation/wormhole-connect@0.2.0/dist/main.js";
script.async = true;
script.type = "module";

const link = document.createElement("link");
link.href =
"https://www.unpkg.com/@wormhole-foundation/wormhole-connect@0.0.12/dist/main.css";
"https://www.unpkg.com/@wormhole-foundation/wormhole-connect@0.2.0/dist/main.css";

document.body.appendChild(script);
document.body.appendChild(link);
Expand Down

0 comments on commit ac07595

Please sign in to comment.