What is the purpose of `entryNames` on Rollup and how I can programatically use it?

23 Views Asked by At

I am read the Rollup Configuration documentation and found out there is this entryNames for input.

type InputOptions = string | string[] | { [entryName: string]: string }

What is the purpose of this entryName?

What I already understand of entryName is used to set [name] at output. I try it and yeah, it works as expected. But is it just it? Is there any purpose of this entryName? Maybe such as I can get what are current entry is in transform via Hooks or Transform function?

In summarize, What is the purpose of this entryName? How could I take advantage and utilised it fully? (beside only changing the options.entryFileNames)


Someone mention this question duplicated and I found this question is answer me up:

I can get the entryName by using chunk.name. But there is something I cannot figure out, how to get the same chunk.name or getting this chunk info at before or during transformation? Before or during plugins[].transform hook called.

0

There are 0 best solutions below