unplugin icon indicating copy to clipboard operation
unplugin copied to clipboard

how to get file reference after `emitFile`?

Open mayank99 opened this issue 2 years ago • 3 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). https://github.com/unjs/unplugin/blob/61feea6f30cd5f1bfde420212e75410b63d293ee/src/types.ts#L22

Is there a different way to get the referenceId?

mayank99 avatar Jan 07 '23 22:01 mayank99

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

ilteoood avatar Jan 08 '23 15:01 ilteoood

same question

lishaobos avatar Feb 02 '23 05:02 lishaobos

Bumping this. I also want this API

deminearchiver avatar Jul 10 '24 09:07 deminearchiver