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}`);
}