Skip to content

Instantly share code, notes, and snippets.

View DanielSRS's full-sized avatar
🕵️‍♂️
Learning new stuff

Daniel Santa Rosa DanielSRS

🕵️‍♂️
Learning new stuff
View GitHub Profile
@DanielSRS
DanielSRS / typescript_bundler.ts
Created April 20, 2025 03:40
Bundle a set of typescript files into a single one without modifying the source code
import ts from "typescript";
import fs from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
const SKIP_THIRD_PARTY_MODULES = true;
const __dirname = path.dirname(fileURLToPath(import.meta.url));
/**
* Get the module path based on the base directory.