Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Bundled type definitions for bundled dependencies?

Open
#1,050 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale

Research direction

Start with the context in #454 and the linked Microbundle dependency-bundling guidance. Reproduce the case where a JavaScript dependency is bundled but its exported type definitions still import that dependency, using TypeScript with skipLibCheck set to false. Done means the project has a decided scope for handling bundled dependency types and a verified reproduction or test.

Written by the indexing model from the issue text.

Description

TypeScript

Context: As documented in #454 and How Microbundle decides which dependencies to bundle, one recommended way to bundle dependencies is to put the dependency in devDependencies rather than dependencies.

Problem: my-bundled-dependency is bundled into my-parent-library, and affects its exported type definitions. Recently a downstream user of my package reported an issue that surprised me – while the JavaScript is bundled as expected, the type definitions are not bundled, and contain an import from my-bundled-dependency. This causes builds to fail for users of my-parent-library if they've enabled TypeScript's skipLibCheck: false. If this is unexpected and a simple repro example would be helpful, I'm happy to create that.

Alternatives: Should the type definitions also be bundled by Microbundle? By TypeScript? Am I perhaps making a mistake by using a bundled dependency in my exported TypeScript API? I'm inclined to the idea that this is something TypeScript, not Microbundle, should ideally handle. But they've historically been pretty unenthusiastic about such requests.

Related:

Dominant language
JavaScript
Stars
8.1k
Forks
358
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from developit/microbundle

All issues in developit/microbundle

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.