Fix: Update HTML path and server.js to match Vite build output
This commit is contained in:
parent
068470a39f
commit
3592df6a5d
3 changed files with 3 additions and 8 deletions
|
|
@ -7,7 +7,7 @@
|
|||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/editor/main.tsx"></script>
|
||||
<script type="module" src="./editor/main.tsx"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
|||
|
|
@ -80,7 +80,8 @@ app.get('/preview/:id', previewPage);
|
|||
|
||||
// Placeholder route handlers
|
||||
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) {
|
||||
|
|
|
|||
|
|
@ -24,12 +24,6 @@ export default defineConfig({
|
|||
rollupOptions: {
|
||||
input: {
|
||||
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';
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue