unjs / unplugin

Unified plugin system for Vite, Rollup, Webpack, esbuild, Rolldown, and more
https://unplugin.unjs.io
MIT License
2.9k stars 104 forks source link

Allow `void` in `TransformResult` #391

Closed huang-julien closed 4 days ago

huang-julien commented 4 days ago

Environment

unplugin 1.10.1 node 20

Reproduction

https://github.com/nuxt/scripts/blob/d2a3bbb4cc298d8bb2accf6d4931aef7239237d7/src/plugins/check-scripts.ts#L40

Describe the bug

Hello :wave:

Sometimes, users can use transform without returning anything. In that case they are forced to specify a return undefined to satisfy typescript.

Additional context

No response

Logs

No response