Fix the pwa example (#3664)

This commit is contained in:
Evan Almloff authored and GitHub committed 2025-01-28 09:40:44 -08:00
1 parent c85018300b
commit 4c8e8567cf
1 file changed
+14 -26
+14 -26
View File
@@ -1,30 +1,18 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>{app_title}</title> <title>{app_title}</title>
<script> <script>
if ('serviceWorker' in navigator) { if ("serviceWorker" in navigator) {
navigator.serviceWorker.register( navigator.serviceWorker.register("/{base_path}/assets/sw.js");
'/sw.js'
);
}
</script>
<link rel="manifest" href="manifest.json">
<meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="UTF-8" />
{style_include}
</head>
<body>
<div id="main"></div>
<script type="module">
import init from "/{base_path}/assets/dioxus/{app_name}.js";
init("/{base_path}/assets/dioxus/{app_name}_bg.wasm").then(wasm => {
if (wasm.__wbindgen_start == undefined) {
wasm.main();
} }
}); </script>
</script> <link rel="manifest" href="/assets/manifest.json" />
{script_include} <meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
</body> <meta name="viewport" content="width=device-width, initial-scale=1" />
<meta charset="UTF-8" />
</head>
<body>
<div id="main"></div>
</body>
</html> </html>