Skip to content

Commit 0acefa9

Browse files
committed
fix(template-vite-typescript): make --force flag work
1 parent f084010 commit 0acefa9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/template/vite-typescript/src/ViteTypeScriptTemplate.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class ViteTypeScriptTemplate extends BaseTemplate {
4747

4848
// TODO: Compatible with any path entry.
4949
// Vite uses index.html under the root path as the entry point.
50-
await fs.move(filePath('index.html'), path.join(directory, 'index.html'));
50+
await fs.move(filePath('index.html'), path.join(directory, 'index.html'), { overwrite: options.force });
5151
await this.updateFileByLine(path.join(directory, 'index.html'), (line) => {
5252
if (line.includes('link rel="stylesheet"')) return '';
5353
if (line.includes('</body>')) return ' <script type="module" src="/src/renderer.ts"></script>\n </body>';

0 commit comments

Comments
 (0)