Skip to content

Commit 1a33c51

Browse files
Merge pull request #303 from swiftwasm/yt/module-name
PackageToJS: Use the actual wasm filename in the final product
2 parents 736db53 + 81fe6c8 commit 1a33c51

File tree

18 files changed

+46
-61
lines changed

18 files changed

+46
-61
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ xcuserdata/
99
.vscode
1010
Examples/*/Bundle
1111
Examples/*/package-lock.json
12-
/Package.resolved
12+
Package.resolved

Examples/ActorOnWebWorker/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<body>
99
<script type="module">
1010
import { init } from "./Bundle/index.js"
11-
init(fetch(new URL("./Bundle/main.wasm", import.meta.url)));
11+
init();
1212
</script>
1313
<h1>Full-text Search with Actor on Web Worker</h1>
1414

Examples/Basic/.gitignore

Lines changed: 0 additions & 5 deletions
This file was deleted.

Examples/Basic/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<body>
99
<script type="module">
1010
import { init } from "./.build/plugins/PackageToJS/outputs/Package/index.js";
11-
await init(fetch("./.build/plugins/PackageToJS/outputs/Package/main.wasm"));
11+
init();
1212
</script>
1313
</body>
1414

Examples/Embedded/.gitignore

Lines changed: 0 additions & 6 deletions
This file was deleted.

Examples/Embedded/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<body>
99
<script type="module">
1010
import { init } from "./.build/plugins/PackageToJS/outputs/Package/index.js";
11-
await init(fetch("./.build/plugins/PackageToJS/outputs/Package/main.wasm"));
11+
init();
1212
</script>
1313
</body>
1414

Examples/Multithreading/.gitignore

Lines changed: 0 additions & 8 deletions
This file was deleted.

Examples/Multithreading/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<body>
3030
<script type="module">
3131
import { init } from "./Bundle/index.js"
32-
init(fetch(new URL("./Bundle/main.wasm", import.meta.url)));
32+
init();
3333
</script>
3434
<h1>Threading Example</h1>
3535
<p>

Examples/OffscrenCanvas/.gitignore

Lines changed: 0 additions & 8 deletions
This file was deleted.

Examples/OffscrenCanvas/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
<body>
7171
<script type="module">
7272
import { init } from "./Bundle/index.js"
73-
init(fetch(new URL("./Bundle/main.wasm", import.meta.url)));
73+
init();
7474
</script>
7575
<h1>OffscreenCanvas Example</h1>
7676
<p>

0 commit comments

Comments
 (0)