fix: get auto type-gen to work on turbo, by running type gen in a child process outside turbo/webpack (#6714)

Before on turbo: https://github.com/vercel/next.js/issues/66723
This commit is contained in:
Alessio Gravili
2024-06-10 18:03:12 -04:00
committed by GitHub
parent ba513d5a97
commit 7b7dc71845
8 changed files with 69 additions and 37 deletions

View File

@@ -32,7 +32,7 @@ export const createTestHooks = async (testSuiteName = '_community') => {
tsConfig.compilerOptions.paths['@payload-config'] = [`./test/${testSuiteName}/config.ts`]
await writeFile(tsConfigPath, stringify(tsConfig, null, 2) + '\n')
process.env.PAYLOAD_CONFIG_PATH = path.resolve(testSuiteName, 'config')
process.env.PAYLOAD_CONFIG_PATH = path.resolve(dirname, testSuiteName, 'config.ts')
},
}
}