From bf3ade207b12e865f57004ded2090e52bff7281f Mon Sep 17 00:00:00 2001 From: Nix Krystik Date: Wed, 20 May 2026 02:55:21 +0800 Subject: [PATCH] Enable source maps in node & update name in Dockerfile. --- Dockerfile | 2 +- package.json | 4 ++-- tsconfig.json | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 13b5e13..3f8621c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ RUN npm run build # ---------- -FROM node:22-alpine +FROM node:22-alpine AS runtime WORKDIR /app ENV NODE_ENV=production diff --git a/package.json b/package.json index c13da75..23ef0c4 100644 --- a/package.json +++ b/package.json @@ -23,8 +23,8 @@ "sqlite3": "^5.1.7" }, "scripts": { - "dev": "tsx watch src/index.ts", - "start": "node --enable-source-maps dist/index.js", + "dev": "tsx watch --enable-source-maps src/index.ts", + "start": "node dist/index.js", "build": "npm run clean && npx tsc && npm run copyfiles", "clean": "npx rimraf dist", "copyfiles": "npx copyfiles -u 1 \"./src/**/*.html\" ./dist" diff --git a/tsconfig.json b/tsconfig.json index af3b1b6..ab30c4a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,6 +16,7 @@ "ES2021.String" ] }, - "include": ["src/**/*"], - "exclude": ["node_modules/**"] + + "include": ["src"], + "exclude": ["node_modules"] } \ No newline at end of file