(appDir: string)
| 174 | } |
| 175 | |
| 176 | async function patchViteConfigForE2E(appDir: string) { |
| 177 | const viteConfigPath = join(appDir, 'vite.config.ts') |
| 178 | |
| 179 | let viteConfig = '' |
| 180 | try { |
| 181 | viteConfig = await readFile(viteConfigPath, 'utf8') |
| 182 | } catch { |
| 183 | return |
| 184 | } |
| 185 | |
| 186 | const next = viteConfig.replace( |
| 187 | 'devtools(),', |
| 188 | 'devtools({ eventBusConfig: { enabled: false } }),', |
| 189 | ) |
| 190 | |
| 191 | if (next !== viteConfig) { |
| 192 | await writeFile(viteConfigPath, next) |
| 193 | } |
| 194 | } |
| 195 | |
| 196 | export function getRepoPath(...segments: Array<string>) { |
| 197 | return resolve(repoRoot, ...segments) |
no test coverage detected