bootstrap node

This commit is contained in:
MathMan05 2025-05-02 14:05:31 -05:00
parent f0fd2e59b3
commit dd3f07b110
3 changed files with 18 additions and 1 deletions

16
buildnode.js Normal file
View file

@ -0,0 +1,16 @@
import * as swc from "@swc/core";
import path from "node:path";
import {fileURLToPath} from "node:url";
import {promises as fs} from "fs";
import child_process from "child_process";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const mod = await swc.transformFile(path.join(__dirname, "build.ts"), {
minify: true,
sourceMaps: true,
isModule: true,
});
await fs.writeFile(path.join(__dirname, "build.js"), mod.code);