Merge pull request #77 from funatic-nl/dont-recompile-typescript-project

Don't recompile typescript project if already compiled
pull/84/head
Boaz Poolman 2022-11-28 17:04:55 +01:00 committed by GitHub
commit 3f02eca41a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -21,8 +21,9 @@ const getStrapiApp = async () => {
const appDir = process.cwd();
const isTSProject = await tsUtils.isUsingTypeScript(appDir);
const outDir = await tsUtils.resolveOutDir(appDir);
const alreadyCompiled = await fs.existsSync(outDir);
if (isTSProject) {
if (isTSProject && !alreadyCompiled) {
await tsUtils.compile(appDir, {
watch: false,
configOptions: { options: { incremental: true } },