Fix: Correct Vite manifest key lookup

- Changed from 'src/client/main.tsx' to 'index.html' to match actual manifest
- Fixes production asset loading
- Resolves empty page issue in production mode
This commit is contained in:
2025-10-02 00:49:53 +02:00
parent 1285560f62
commit 65a0b8c823

View File

@@ -14,7 +14,7 @@ export function clientEntry(c: Context<BlankEnv>) {
// Read Vite manifest to get the correct file names
const manifestPath = join(process.cwd(), 'dist', '.vite', 'manifest.json');
const manifest = JSON.parse(readFileSync(manifestPath, 'utf-8'));
const entry = manifest['src/client/main.tsx'];
const entry = manifest['index.html'];
if (entry) {
jsFile = `/assets/${entry.file}`;
if (entry.css) {