fix(build): standard Vite layout so Railpack finds dist/

Railpack resolved outDir '../dist' (with root 'src') to /dist and the
deploy failed at "copy /dist". index.html now lives at the repo root and
the build writes to the default ./dist.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
HangerThem 2026-11-07 13:09:25 +01:00
parent bb5ecbcd6d
commit 51d9985743
2 changed files with 2 additions and 6 deletions

View file

@ -12,6 +12,6 @@
</head> </head>
<body> <body>
<div id="root"></div> <div id="root"></div>
<script type="module" src="./main.tsx"></script> <script type="module" src="./src/main.tsx"></script>
</body> </body>
</html> </html>

View file

@ -1,13 +1,9 @@
import preact from '@preact/preset-vite' import preact from '@preact/preset-vite'
import { defineConfig } from 'vite' import { defineConfig } from 'vite'
// Standard layout: index.html at the root, output in ./dist (what Railpack/Coolify expect).
export default defineConfig({ export default defineConfig({
plugins: [preact()], plugins: [preact()],
root: 'src',
// relative asset URLs so dist/ works from any sub-path // relative asset URLs so dist/ works from any sub-path
base: './', base: './',
build: {
outDir: '../dist',
emptyOutDir: true,
},
}) })