From 70cc31b83479e799573479b7153dcaee8cf3298a Mon Sep 17 00:00:00 2001 From: Kentai Radiquum Date: Thu, 13 Feb 2025 11:48:22 +0500 Subject: [PATCH] fixes --- src/build.tsx | 19 ------------------- src/templates/Base.tsx | 2 +- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/src/build.tsx b/src/build.tsx index 9f02b0c..535ed69 100644 --- a/src/build.tsx +++ b/src/build.tsx @@ -43,24 +43,5 @@ if (environment == "dev") { log.info(stdout); } ); - - const transpiler = new Bun.Transpiler({ - loader: "js", - target: "browser", - minifyWhitespace: true, - }); - - const files = fs.readdirSync("src/static/js"); - const minify = files.filter((file) => file.endsWith(".js")); - - minify.forEach((file) => { - const ext = file.split(".")[file.split(".").length - 1]; - const name = file.split(".")[0]; - const orFile = fs.readFileSync(`src/static/js/${file}`, { - encoding: "utf-8", - }); - const minFile = transpiler.transformSync(orFile); - fs.writeFileSync(`out/static/js/${name}.${ext}`, minFile); - }); } fs.writeFileSync("out/index.html", `${html}`); diff --git a/src/templates/Base.tsx b/src/templates/Base.tsx index 2a40bec..48941f2 100644 --- a/src/templates/Base.tsx +++ b/src/templates/Base.tsx @@ -8,7 +8,7 @@ interface BaseProps { export default function Base({ children, isDev }: BaseProps) { return ( <> - +