MCPcopy Create free account
hub / github.com/TanStack/cli / patchViteConfigForE2E

Function patchViteConfigForE2E

packages/cli/tests-e2e/helpers.ts:176–194  ·  view source on GitHub ↗
(appDir: string)

Source from the content-addressed store, hash-verified

174}
175
176async 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
196export function getRepoPath(...segments: Array<string>) {
197 return resolve(repoRoot, ...segments)

Callers 1

createAppFixtureFunction · 0.85

Calls 1

replaceMethod · 0.65

Tested by

no test coverage detected