mirror of
https://github.com/strapi/strapi.git
synced 2025-09-27 17:29:14 +00:00
Update config to handle useTypescript
This commit is contained in:
parent
77daaf7e72
commit
511bf2920c
@ -6,6 +6,7 @@ const { isFunction } = require('lodash/fp');
|
|||||||
const { createLogger } = require('@strapi/logger');
|
const { createLogger } = require('@strapi/logger');
|
||||||
const { Database } = require('@strapi/database');
|
const { Database } = require('@strapi/database');
|
||||||
const { createAsyncParallelHook } = require('@strapi/utils').hooks;
|
const { createAsyncParallelHook } = require('@strapi/utils').hooks;
|
||||||
|
const { isTypeScriptProjectSync } = require('@strapi/typescript-utils');
|
||||||
|
|
||||||
const loadConfiguration = require('./core/app-configuration');
|
const loadConfiguration = require('./core/app-configuration');
|
||||||
|
|
||||||
@ -76,6 +77,7 @@ class Strapi {
|
|||||||
|
|
||||||
// Load the app configuration from the dist directory
|
// Load the app configuration from the dist directory
|
||||||
const appConfig = loadConfiguration({ appDir: rootDirs.app, distDir: rootDirs.dist }, opts);
|
const appConfig = loadConfiguration({ appDir: rootDirs.app, distDir: rootDirs.dist }, opts);
|
||||||
|
appConfig.server.useTypescript = isTypeScriptProjectSync(this.dirs.app.root);
|
||||||
|
|
||||||
// Instanciate the Strapi container
|
// Instanciate the Strapi container
|
||||||
this.container = createContainer(this);
|
this.container = createContainer(this);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user