[Feature] banner and footer based on chunk
- Dominant language
- Go
- Stars
- 40.1k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
## Feature Request
As a continuation of #482 I'd like to propose an option to have the banner set by chunk, as seen in Rollup and [documented here](https://rollupjs.org/configuration-options/#output-banner-output-footer).
## Use case
With React now having server components, and files in Next.js using `"use client"` to indicate a client component, it has made bundling libraries with tsup/esbuild a pain. I'm now running multiple dev scripts using different config files for server/client components.
I did have a look at creating a plugin but from what I could tell I'd then have to do all the typescript transpiling within the plugin as well?
Contributor guide
No contributing guide indexed for this repository
Research direction
Review the existing banner and footer work from #482, then compare the requested behavior with Rollup's output.banner and output.footer documentation. Confirm how per-chunk values should support server and client components, and define completion by having banner and footer options applied independently to each generated chunk.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, nextjs, react, rollup, typescript
- Domain
- build-system, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100