diff --git a/server/cli.js b/server/cli.js index 7e900cd..d062630 100644 --- a/server/cli.js +++ b/server/cli.js @@ -27,8 +27,10 @@ const getStrapiApp = async () => { if (!isTSProject || !alreadyCompiled) { appContext = await compileStrapi(); } else { - appContext = { appDir, outDir }; + const distDir = isTSProject ? outDir : appDir; + appContext = { appDir, distDir }; } + const app = await createStrapi(appContext).load(); return app; };