📄 SKILL.md

← Vault

name: lovable-vps-deploy-fix

description: Fix Vite build not generating script tags when deploying Lovable/TanStack Start React projects to VPS with nginx

category: devops

tags: [vite, lovable, tanstack-start, vps, deploy, nginx]


Lovable → VPS Deploy (Vite Build Fix)

Context

When deploying a Lovable/TanStack Start React project to a standard VPS (nginx), the Vite build fails to generate index.html with

`

Critical: This root index.html MUST have );

writeFileSync(filePath, c);

}

const mainJs = getMainJs();

patch(join(root, 'dist', 'index.html'), mainJs);

patch(join(root, 'index.html'), mainJs);

`

Verification

`bash

Should show