fix: cannot build prod and delete unused file

This commit is contained in:
2026-07-08 18:42:54 +02:00
parent 73dd672fdb
commit 99a1097053
6 changed files with 32 additions and 19 deletions
-14
View File
@@ -1,14 +0,0 @@
{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": "current"
},
"modules": false
}
],
"@babel/preset-typescript"
]
}
+1 -1
View File
@@ -5,7 +5,7 @@
"main": "server.ts",
"scripts": {
"dev": "tsx --watch server.ts",
"build": "tsc -b",
"build": "tsc -b && node scripts/copy-assets.cjs",
"start": "node dist/server.js"
},
"keywords": [],
+17
View File
@@ -0,0 +1,17 @@
// scripts/copy-assets.cjs
const fs = require("fs");
const path = require("path");
const rootDir = path.join(__dirname, "..");
const distDir = path.join(rootDir, "dist");
const sqlFiles = fs
.readdirSync(rootDir)
.filter((f) => f.endsWith(".scheme.sql"));
for (const file of sqlFiles) {
const srcPath = path.join(rootDir, file);
const distPath = path.join(distDir, file);
fs.copyFileSync(srcPath, distPath);
console.log(`Copied ${srcPath} -> ${distPath}`);
}
+9 -1
View File
@@ -1,5 +1,13 @@
import js from "@eslint/js";
import globals from "globals";
export default [
js.configs.recommended,
js.configs.recommended,
{
languageOptions: {
globals: {
...globals.node,
},
},
},
];
+2 -1
View File
@@ -17,7 +17,8 @@
"@eslint/js": "^10.0.1",
"@types/cors": "^2.8.19",
"@types/express": "^5.0.6",
"concurrently": "^10.0.3"
"concurrently": "^10.0.3",
"globals": "^17.7.0"
}
},
"backend": {
+2 -1
View File
@@ -34,6 +34,7 @@
"@eslint/js": "^10.0.1",
"@types/cors": "^2.8.19",
"@types/express": "^5.0.6",
"concurrently": "^10.0.3"
"concurrently": "^10.0.3",
"globals": "^17.7.0"
}
}