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
This is not the best solution as it needs to write to the filesystem. Ideally the plugin should just return a .d.ts file representing the JSON module with a custom resolve hook so that rollup-plugin-dts's transform file task won't run. However it needs to replicate some works in rollup-plugin-dts where I'm too lazy to do so.
Logs
No response
The text was updated successfully, but these errors were encountered:
Environment
Node.js v22.5.1
Reproduction
See this type declaration file in
@unocss/preset-icons
: https://hyrious.me/npm-browser/?q=@unocss/[email protected]/package/dist/core.d.ts:101Describe the bug
Additional context
I myself solved this problem by adding a custom rollup plugin that replaces the JSON file with a transformed valid JS(TS) file so that rollup-plugin-dts can handle it like other files: https://github.com/hyrious/dts/blob/main/src/index.ts#L162-L169
This is not the best solution as it needs to write to the filesystem. Ideally the plugin should just return a .d.ts file representing the JSON module with a custom resolve hook so that rollup-plugin-dts's transform file task won't run. However it needs to replicate some works in rollup-plugin-dts where I'm too lazy to do so.
Logs
No response
The text was updated successfully, but these errors were encountered: