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
When rollup-plugin-dts cannot find the tsconfig path, then it will start looking for the local tsconfig.json and parse it. But sometimes the final result of parsing can not be correct. For instance
If users gave incremental: true in compiler options but didn't specify tsBuildInfoFile cause they expect that will be filled with default value from typescript, which is .tsbuildinfo. Usually types generation don't need to pick up those project or compiler cache related configs such as composite or incremental,
Checklist
I can reproduce this issue when running this plugin on its own. Other plugins, such as node-resolve are known to cause issues.
I am running this plugin on .d.ts files generated by TypeScript. The plugin can consume .ts and even .js files (with allowJs: true), but this is known to cause issues.
This issue is not related to rolling up @types. The plugin ignores these by default, unless respectExternal is set. @types can contain hand-crafted code which is known to cause issues.
Code Snipped
Here in the plugin, when it failed to find the local config, it went to search for the local tsconfig and parse it.
error TS5074: Option '--incremental' can only be specified using tsconfig, emitting to single file or when option '--tsBuildInfoFile' is specified.
Expected
I wonder if we can just have an value on tsconfig that can disable this picking up local config behavior. Such as tsconfig: false that will only use the overriden compiler options without merging with local tsconfig. That would be much easier for generating types since it can rely on a fixed compiler options config no matter how users config it.
The text was updated successfully, but these errors were encountered:
When rollup-plugin-dts cannot find the tsconfig path, then it will start looking for the local tsconfig.json and parse it. But sometimes the final result of parsing can not be correct. For instance
If users gave
incremental: true
in compiler options but didn't specifytsBuildInfoFile
cause they expect that will be filled with default value from typescript, which is.tsbuildinfo
. Usually types generation don't need to pick up those project or compiler cache related configs such ascomposite
orincremental
,Checklist
Other plugins, such as
node-resolve
are known to cause issues..d.ts
files generated by TypeScript.The plugin can consume
.ts
and even.js
files (withallowJs: true
), but this is known to cause issues.@types
.The plugin ignores these by default, unless
respectExternal
is set.@types
can contain hand-crafted code which is known to cause issues.Code Snipped
Here in the plugin, when it failed to find the local config, it went to search for the local tsconfig and parse it.
rollup-plugin-dts/src/program.ts
Lines 66 to 76 in fea09d8
Error Message
Failed with TS error
Expected
I wonder if we can just have an value on
tsconfig
that can disable this picking up local config behavior. Such astsconfig: false
that will only use the overriden compiler options without merging with local tsconfig. That would be much easier for generating types since it can rely on a fixed compiler options config no matter how users config it.The text was updated successfully, but these errors were encountered: