From b380758dd10a6fd4b9f757bba9ae47928c9b5952 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Sat, 5 Oct 2024 13:15:16 +0200 Subject: [PATCH] chore: remove extra default check --- src/build.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/build.ts b/src/build.ts index 28eeaeb1..4b7848d8 100644 --- a/src/build.ts +++ b/src/build.ts @@ -30,9 +30,9 @@ export async function build( // Create jiti instance for loading initial config const jiti = createJiti(rootDir); - let _buildConfig: BuildConfig | BuildConfig[] = + const _buildConfig: BuildConfig | BuildConfig[] = (await jiti.import("./build.config", { try: true, default: true })) || {}; - _buildConfig = (_buildConfig as any).default || _buildConfig; + const buildConfigs = ( Array.isArray(_buildConfig) ? _buildConfig : [_buildConfig] ).filter(Boolean);