You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is whether it is a bug or a deliberate design. I think when declaration is set as false explicitly, it should be false. It is counter-intuitive that set it as false but it still work. So in my option, user-initiated actions should have the highest priority.
Environment
Node.js
: v20.10.0pnpm
: v8.15.5unbuild
: v2.0.0Reproduction
See minirepo.
Describe the bug
The option
declaration
do not do anything because in the end it will be set according toexports
inpackage.json
.declaration: false
will not work:When in
package.json
:The
declaration
will be settrue
if the values ofexports
contains any files named*.d.(m|c)?ts
inpackage.json
.Also, because of the same reason,
declaration: 'node16'
can not work too, it is same astrue
instead of the description in comments.More details refer to:
unbuild/src/auto.ts
Line 34 in bfb4a34
unbuild/src/auto.ts
Line 154 in bfb4a34
The problem is whether it is a bug or a deliberate design. I think when
declaration
is set asfalse
explicitly, it should befalse
. It is counter-intuitive that set it asfalse
but it still work. So in my option, user-initiated actions should have the highest priority.Additional context
To fix it, refer to:
unbuild/src/auto.ts
Line 34 in bfb4a34
If
declaration
is notundefined
, it should use what user provided.I am glad to provide a PR for that!
Logs
No response
The text was updated successfully, but these errors were encountered: