fix: backend won't start

This commit is contained in:
2026-07-08 11:31:38 +02:00
parent 84fa2e0ab0
commit 87bed4e1c7
7 changed files with 2240 additions and 344 deletions
+8 -11
View File
@@ -1,7 +1,7 @@
import {defineConfig} from 'vite'
import path from 'path'
import {dirname} from "node:path";
import {fileURLToPath} from "node:url";
import {dirname} from "node:path"
import {fileURLToPath} from "node:url"
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
@@ -12,21 +12,18 @@ export default defineConfig({
outDir: '../dist',
emptyOutDir: true,
sourcemap: true,
minify: 'esbuild', // Use esbuild for minification (default)
minify: 'esbuild',
assetsDir: 'assets',
rollupOptions: {
input: path.resolve(__dirname, 'src/index.html'),
output: {
assetFileNames: 'assets/[name]-[hash][extname]' // Hashing for cache busting
}
}
assetFileNames: 'assets/[name]-[hash][extname]',
},
},
},
resolve: {
alias: {
'@': path.resolve(__dirname, 'src'), // Optional alias for cleaner imports
}
'@': path.resolve(__dirname, 'src'),
},
},
define: {
'process.env.NODE_ENV': '"production"' // Inject environment variables
}
})