Fix: Update HTML path and server.js to match Vite build output

This commit is contained in:
mmabdalla 2025-12-29 01:09:29 +02:00
parent 068470a39f
commit 3592df6a5d
3 changed files with 3 additions and 8 deletions

View file

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

View file

@ -80,7 +80,8 @@ app.get('/preview/:id', previewPage);
// Placeholder route handlers // Placeholder route handlers
async function serveEditor(req, res) { async function serveEditor(req, res) {
res.sendFile(path.join(__dirname, 'dist', 'index.html')); const indexPath = path.join(__dirname, 'dist', 'frontend', 'index.html');
res.sendFile(indexPath);
} }
async function previewPage(req, res) { async function previewPage(req, res) {

View file

@ -24,12 +24,6 @@ export default defineConfig({
rollupOptions: { rollupOptions: {
input: { input: {
main: path.resolve(__dirname, 'frontend/index.html'), main: path.resolve(__dirname, 'frontend/index.html'),
renderer: path.resolve(__dirname, 'frontend/renderer/main.tsx'),
},
output: {
entryFileNames: (chunkInfo) => {
return chunkInfo.name === 'renderer' ? 'renderer.js' : '[name].js';
},
}, },
}, },
}, },