From 17129dd84dbeaeae5195fe521e18e410d206dac5 Mon Sep 17 00:00:00 2001 From: Code by Ben Date: Tue, 17 Sep 2024 09:53:37 +1000 Subject: [PATCH] fixed wasm loading issues. --- handler/app/asset.go | 2 +- handler/router.go | 1 + public/js/{wdosbox.wasm.js => wdosbox.wasm} | Bin 3 files changed, 2 insertions(+), 1 deletion(-) rename public/js/{wdosbox.wasm.js => wdosbox.wasm} (100%) diff --git a/handler/app/asset.go b/handler/app/asset.go index cff9a351..b1741b31 100644 --- a/handler/app/asset.go +++ b/handler/app/asset.go @@ -38,7 +38,7 @@ func Hrefs() Paths { Bootstrap5JS: "/js/bootstrap.bundle.min.js", BootstrapIcons: "/svg/bootstrap-icons.svg", DosboxJS: "/js/wdosbox.js", - DosboxWasm: "/js/wdosbox.wasm.js", + DosboxWasm: "/js/wdosbox.wasm", EditArtifact: "/js/editor-artifact.min.js", EditAssets: "/js/editor-assets.min.js", EditForApproval: "/js/editor-forapproval.min.js", diff --git a/handler/router.go b/handler/router.go index fca85fdc..92882586 100644 --- a/handler/router.go +++ b/handler/router.go @@ -116,6 +116,7 @@ func (c Configuration) embed(e *echo.Echo, public embed.FS) *echo.Echo { e.FileFS("/osd.xml", "public/text/osd.xml", public) e.FileFS("/robots.txt", "public/text/robots.txt", public) e.FileFS("/site.webmanifest", "public/text/site.webmanifest.json", public) + e.FileFS("/wdosbox.wasm.js", "public/js/wdosbox.wasm", public) // this is required by `js-dos.js` return e } diff --git a/public/js/wdosbox.wasm.js b/public/js/wdosbox.wasm similarity index 100% rename from public/js/wdosbox.wasm.js rename to public/js/wdosbox.wasm