Significant performance improvements
This commit is contained in:
parent
5ba3cf247a
commit
4da0e8675f
5 changed files with 6836 additions and 5029 deletions
|
|
@ -3,8 +3,6 @@
|
|||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<script src="/epoxy/index.js" defer></script>
|
||||
<script src="/libcurl/index.js" defer></script>
|
||||
<script src="/transports/bareTransport.js" defer></script>
|
||||
<script src="/uv/uv.bundle.js" defer></script>
|
||||
<script src="/uv/uv.config.js" defer></script>
|
||||
|
|
|
|||
|
|
@ -45,6 +45,9 @@
|
|||
"react-icons": "^4.12.0",
|
||||
"react-toastify": "^9.1.3",
|
||||
"tsx": "^4.7.3",
|
||||
"vite-plugin-static-copy": "^1.0.4",
|
||||
"vite-plugin-vsharp": "^1.7.3",
|
||||
"vite-plugin-webp-generator": "^0.0.5",
|
||||
"wisp-server-node": "^1.0.6",
|
||||
"ws": "^8.17.0"
|
||||
},
|
||||
|
|
@ -59,7 +62,6 @@
|
|||
"prettier-plugin-tailwindcss": "^0.5.14",
|
||||
"tailwindcss": "^3.4.3",
|
||||
"typescript": "^5.4.5",
|
||||
"vite": "^5.2.10",
|
||||
"vite-plugin-static-copy": "^1.0.3"
|
||||
"vite": "^5.2.10"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
11831
pnpm-lock.yaml
generated
11831
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,7 +1,6 @@
|
|||
import { useState } from "preact/hooks";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { HeaderRoute } from "../components/HeaderRoute";
|
||||
|
||||
import { set } from "../util/IDB";
|
||||
import { uninstallServiceWorkers } from "../util/SWHelper";
|
||||
import prod from "./config.json"; // Set prod to true if you wish to load balance
|
||||
|
|
@ -102,6 +101,24 @@ export function Home() {
|
|||
);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
const epoxyScript = document.createElement("script");
|
||||
epoxyScript.src = "/epoxy/index.js";
|
||||
|
||||
epoxyScript.onload = function () {
|
||||
console.log("lazy loaded epoxy");
|
||||
};
|
||||
|
||||
const libcurlScript = document.createElement("script");
|
||||
libcurlScript.src = "/libcurl/index.js";
|
||||
|
||||
libcurlScript.onload = function () {
|
||||
console.log("lazy loaded libcurl");
|
||||
};
|
||||
|
||||
document.body.appendChild(epoxyScript);
|
||||
document.body.appendChild(libcurlScript);
|
||||
}, []);
|
||||
return (
|
||||
<HeaderRoute>
|
||||
<CloakedHead
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ import path from "path";
|
|||
import { createBareServer } from "@tomphttp/bare-server-node";
|
||||
import wisp from "wisp-server-node";
|
||||
import http from "http";
|
||||
import vsharp from "vite-plugin-vsharp";
|
||||
|
||||
const __dirname = path.resolve();
|
||||
|
||||
export default defineConfig({
|
||||
|
|
@ -49,7 +51,10 @@ export default defineConfig({
|
|||
]
|
||||
}),
|
||||
million.vite({ auto: true }),
|
||||
preact()
|
||||
preact(),
|
||||
vsharp({
|
||||
width: 400
|
||||
})
|
||||
],
|
||||
server: {
|
||||
proxy: {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue