small code restructure

This commit is contained in:
Zoe
2022-10-13 20:23:48 -05:00
parent a9817c7911
commit 651c1d87a2

View File

@@ -66,8 +66,6 @@ async function createServer() {
fileName = fileName.join('/').toLowerCase().trim();
}
template = template.replace('<script async src="/src/entry-client.ts" type="module"></script>', '');
// 2. Apply Vite HTML transforms. This injects the Vite HMR client, and
// also applies HTML transforms from Vite plugins, e.g. global preambles
// from @vitejs/plugin-react
@@ -120,6 +118,8 @@ async function createServer() {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const appState = main.appState;
template = template.replace('<script async src="/src/entry-client.ts" type="module"></script>', '');
template = template.replace('id="app"', 'id="app" data-server-rendered="true"');
let scriptedTemplate = template;