There was an error while loading. Please reload this page.
2 parents 4a4806d + af6902c commit c273ae3Copy full SHA for c273ae3
src/index.js
@@ -146,14 +146,18 @@ async function scaffold(to, opts) {
146
to,
147
opts.useTS,
148
);
149
+
150
+const htmlPath = resolve(to, 'index.html');
151
+const html = (await fs.readFile(htmlPath, 'utf-8')).replace('<script', '<script prerender');
152
+await fs.writeFile(htmlPath, html);
153
}
154
155
if (opts.useTS) {
156
await fs.rename(resolve(to, 'jsconfig.json'), resolve(to, 'tsconfig.json'));
157
158
const htmlPath = resolve(to, 'index.html');
159
const html = (await fs.readFile(htmlPath, 'utf-8')).replace('index.jsx', 'index.tsx');
-return await fs.writeFile(htmlPath, html);
160
161
162
163
if (opts.useESLint) {
0 commit comments