globals.js

This commit is contained in:
Martin Kavík 2024-10-08 18:02:49 +02:00
parent a99915c8c3
commit 1d20d3ac56
10 changed files with 122 additions and 53 deletions

1
backend/globals.js Normal file
View file

@ -0,0 +1 @@
var process = { env: { IS_PREACT: "false" } };

View file

@ -1,2 +1,3 @@
import { FW } from '/_api/pkg/frontend.js';
window.FW = FW;

View file

@ -5,6 +5,11 @@ async fn frontend() -> Frontend {
.title("FastWave")
.append_to_head(include_str!("../favicon.html")) // realfavicongenerator.net
.append_to_head(concat!("<style>", include_str!("../style.css"), "</style>"))
.append_to_head(concat!(
"<script>",
include_str!("../globals.js"),
"</script>"
))
.append_to_head(concat!(
"<script type=\"module\">",
include_str!("../index.js"),