unjs / unplugin

Unified plugin system for Vite, Rollup, Webpack, esbuild, Rolldown, and more

Home Page:https://unplugin.unjs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to get file reference after `emitFile`?

mayank99 opened this issue · comments

emitFile is supposed to a return a referenceId which can be used to import/export the file in other files.

unplugin seems to not return anything (even the typescript type is void).

emitFile: (emittedFile: EmittedAsset) => void

Is there a different way to get the referenceId?

emitFile seems to work with both vite and rollup, but with webpack the result is undefined.

same question

Bumping this. I also want this API