Conversation
## Re-export `BuildConfig` type from `obuild/config` When using `build.config.ts` with `export default defineBuildConfig(...)`, TypeScript emits the following error: ``` The inferred type of 'default' cannot be named without a reference to './node_modules/obuild/dist/_chunks/types.mjs'. This is likely not portable. A type annotation is needed. ts(2742) ``` This happens because `BuildConfig` is not re-exported from `obuild/config`, so TypeScript cannot name the return type of `defineBuildConfig()` without referencing an internal path. ### Fix Re-export `BuildConfig` from `src/config.ts`. This allows consumers to annotate the type explicitly if needed, and resolves the ts(2742) error.
pi0
approved these changes
Feb 24, 2026
BuildConfig type
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #74 +/- ##
=======================================
Coverage 61.39% 61.39%
=======================================
Files 6 6
Lines 417 417
Branches 129 129
=======================================
Hits 256 256
Misses 120 120
Partials 41 41 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Re-export
BuildConfigtype fromobuild/configWhen using
build.config.tswithexport default defineBuildConfig(...), TypeScript emits the following error:This happens because
BuildConfigis not re-exported fromobuild/config, so TypeScript cannot name the return type ofdefineBuildConfig()without referencing an internal path.Fix
Re-export
BuildConfigfromsrc/config.ts.This allows consumers to annotate the type explicitly if needed, and resolves the ts(2742) error.