(build): Switch to esbuild & transpile to commonjs.

This commit is contained in:
2026-06-13 00:58:17 +00:00
parent 38ddcde06c
commit 6f10dedc12
7 changed files with 404 additions and 280 deletions
+5 -5
View File
@@ -1,13 +1,12 @@
{
"type": "module",
"devDependencies": {
"@eslint/js": "9.27.0",
"@stylistic/eslint-plugin": "4.2.0",
"@types/express": "5.0.2",
"@types/express-session": "1.18.1",
"copyfiles": "2.4.1",
"eslint": "9.27.0",
"rimraf": "6.0.1",
"tsc-alias": "1.8.17",
"tsx": "4.19.4",
"typescript": "5.8.3",
"typescript-eslint": "8.32.1"
@@ -28,8 +27,9 @@
"scripts": {
"dev": "tsx watch --enable-source-maps src/index.ts",
"start": "node dist/index.js",
"build": "npm run clean && npx tsc && npx tsc-alias && npm run copyfiles",
"clean": "npx rimraf dist",
"copyfiles": "npx copyfiles -u 1 \"./src/**/*.html\" ./dist"
"build": "npm run clean && npm run compile && npm run copyfiles",
"compile": "esbuild 'src/**/*.ts' --platform=node --format=cjs --minify --outdir=dist",
"clean": "rimraf dist",
"copyfiles": "copyfiles -u 1 \"./src/**/*.html\" ./dist"
}
}