Inline beacon fonts to avoid binary artifacts

This commit is contained in:
thePR0M3TH3AN committed 2025-10-13 19:01:30 -04:00
1 parent 13d202e1af
commit 7d1c77e4ba
13 files changed
+2849 -46

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
#!/usr/bin/env node
import { build } from "esbuild";
import { mkdir } from "node:fs/promises";
import path from "node:path";
import { fileURLToPath } from "node:url";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const repoRoot = path.resolve(__dirname, "..");
const entryPoint = path.join(repoRoot, "torrent/src/beacon-vendor.js");
const outDir = path.join(repoRoot, "torrent/dist");
await mkdir(outDir, { recursive: true });
await build({
bundle: true,
entryPoints: { "beacon.vendor": entryPoint },
outdir: outDir,
format: "iife",
platform: "browser",
target: ["es2019"],
minify: true,
sourcemap: false,
entryNames: "[name]",
loader: {
".css": "css",
".woff": "dataurl",
".woff2": "dataurl",
".ttf": "dataurl",
".eot": "dataurl",
".svg": "dataurl",
},
logLevel: "info",
});
-1
View File
@@ -13,7 +13,6 @@ const IGNORED_DIRS = new Set([
".git",
"node_modules",
"vendor",
"torrent",
"dist",
"build",
".next",