Skip to content

Commit

Permalink
fix(config): only take default export
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Oct 4, 2024
1 parent f7ab6ce commit fefafec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fefafec

Please sign in to comment.