-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid empty reexport statements in .cjs.mjs
files
#558
Conversation
|
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #558 +/- ##
==========================================
+ Coverage 92.11% 92.17% +0.05%
==========================================
Files 41 41
Lines 1979 1981 +2
Branches 584 585 +1
==========================================
+ Hits 1823 1826 +3
+ Misses 146 145 -1
Partials 10 10
☔ View full report in Codecov by Sentry. |
packages/cli/src/utils.ts
Outdated
@@ -336,6 +336,9 @@ export function dtsTemplate( | |||
} | |||
|
|||
function getReexportStatement(namedExports: string[], source: string): string { | |||
if (!namedExports.length) { | |||
return ""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return ""; | |
return `import ${source};` |
An entrypoint could (and likely does if it has no exports) have side-effects so we still need to import it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do u always have to be right? :P pushed out this change with extra tests for this
No description provided.