Skip to content

feat: support a function for includeContent in Bundle - #165

Merged
antfu merged 2 commits into
Rich-Harris:masterfrom
ggoodman:include-content-function
Sep 10, 2026
Merged

feat: support a function for includeContent in Bundle#165
antfu merged 2 commits into
Rich-Harris:masterfrom
ggoodman:include-content-function

Conversation

@ggoodman

Copy link
Copy Markdown
Contributor

Suppose you have a magic-string built up from a variety of sources, some of which can be loaded by the runtime and some that can't. Those that can be loaded might be, for example, public http(s) urls. In this scenario, you might want to embed source content for those sources that can't be loaded at runtime.

Allows per-source control over whether a source's content is embedded in
the generated sourcemap's `sourcesContent`, e.g. to omit content for
sources that are otherwise loadable at runtime (public http(s) urls).

Reworked for the current TypeScript codebase.

Co-authored-by: Geoff Goodman <ggoodman@gmail.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@antfu
antfu force-pushed the include-content-function branch from 4c1bdf5 to c581d4d Compare September 10, 2026 01:12
@antfu antfu changed the title Support a function for includeContent in Bundle feat: support a function for includeContent in Bundle Sep 10, 2026
@antfu
antfu merged commit ead0c08 into Rich-Harris:master Sep 10, 2026
3 checks passed
@ggoodman

Copy link
Copy Markdown
Contributor Author

Hello younger, pre-AI Geoff. Thanks @antfu 🙇🏼.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants