diff --git a/package-lock.json b/package-lock.json index e6e9dad..11a9bdb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@athenna/core", - "version": "5.41.0", + "version": "5.42.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@athenna/core", - "version": "5.41.0", + "version": "5.42.0", "license": "MIT", "dependencies": { "pretty-repl": "^3.1.2", diff --git a/package.json b/package.json index ed900a5..2079328 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@athenna/core", - "version": "5.41.0", + "version": "5.42.0", "description": "One foundation for multiple applications.", "license": "MIT", "author": "João Lenon ", diff --git a/src/commands/BuildCommand.ts b/src/commands/BuildCommand.ts index 0991468..b82b9df 100644 --- a/src/commands/BuildCommand.ts +++ b/src/commands/BuildCommand.ts @@ -66,8 +66,8 @@ export class BuildCommand extends BaseCommand { tasks.addPromise( `Compiling static files using ${Color.yellow.bold('vite')}`, - async () => { - const config = await this.getViteConfig(vite) + () => { + const config = this.getViteConfig() return vite.build(config) } @@ -76,8 +76,8 @@ export class BuildCommand extends BaseCommand { if (Config.exists('http.vite.ssrEntrypoint')) { tasks.addPromise( `Compiling SSR entrypoint using ${Color.yellow.bold('vite')}`, - async () => { - const config = await this.getViteConfig(vite) + () => { + const config = this.getViteConfig() if (!config.build) { config.build = {} @@ -134,16 +134,10 @@ export class BuildCommand extends BaseCommand { return import('vite') } - public async getViteConfig(vite: any) { - const { config } = await vite.loadConfigFromFile( - { - command: 'build', - mode: 'production' - }, - undefined, - Path.pwd() - ) - - return config + public getViteConfig(): Record { + return { + root: Path.pwd(), + mode: 'production' + } } }