Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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 <lenon@athenna.io>",
Expand Down
24 changes: 9 additions & 15 deletions src/commands/BuildCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -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 = {}
Expand Down Expand Up @@ -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<string, any> {
return {
root: Path.pwd(),
mode: 'production'
}
}
}
Loading