yingye / rollup-plugin-banner

Rollup plugin to append content before js bundle.
MIT License
16 stars 7 forks source link

banner as a function #7

Open stropho opened 4 years ago

stropho commented 4 years ago

Hello, I filed an issue in rollup https://github.com/rollup/rollup/issues/3398 to include more information about the output chunk in banner option.

Is it something that could be implemented in the banner plugin ? I'm willing to do a PR. I just want to confirm it can be done. There could be e.g. a new option {resolveBanner: (chinkInfo: ChunkInfo) => string|Promise<string>} . I believe it could be done without introducing any Breaking change.