diff --git a/src/build.ts b/src/build.ts index cbfee9ef..a58377c0 100644 --- a/src/build.ts +++ b/src/build.ts @@ -30,8 +30,9 @@ export async function build( // Create jiti instance for loading initial config const jiti = createJiti(rootDir, { interopDefault: true }); - const _buildConfig: BuildConfig | BuildConfig[] = + let _buildConfig: BuildConfig | BuildConfig[] = (await jiti.import("./build.config", { try: true })) || {}; + _buildConfig = (_buildConfig as any).default || _buildConfig; const buildConfigs = ( Array.isArray(_buildConfig) ? _buildConfig : [_buildConfig] ).filter(Boolean);