chore: updated installer to remove unused files
6d8b9b3a
1 file(s) · +12 −0
| 115 | 115 | ); |
|
| 116 | 116 | fs.copySync(homeComponentSrc, homeComponentTarget); |
|
| 117 | 117 | ||
| 118 | + | // Remove unused files (App.tsx and main.tsx are not used in MPA setup) |
|
| 119 | + | const appTsxPath = path.join(projectPath, "client", "src", "App.tsx"); |
|
| 120 | + | const mainTsxPath = path.join(projectPath, "client", "src", "main.tsx"); |
|
| 121 | + | ||
| 122 | + | if (fs.existsSync(appTsxPath)) { |
|
| 123 | + | fs.removeSync(appTsxPath); |
|
| 124 | + | } |
|
| 125 | + | ||
| 126 | + | if (fs.existsSync(mainTsxPath)) { |
|
| 127 | + | fs.removeSync(mainTsxPath); |
|
| 128 | + | } |
|
| 129 | + | ||
| 118 | 130 | // Copy react-router.config.ts |
|
| 119 | 131 | const reactRouterConfigSrc = path.join( |
|
| 120 | 132 | EXTRAS_DIR, |