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

Transpiling local package dependencies that use TS file as entry point

Open
#845 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start by reproducing the failure with the linked packages-publishing-sample monorepo, where package b depends on package a and a uses src/index.ts as its entry point. Read how microbundle handles dependencies during bundling and compare the stated dist/index.js and local-TypeScript entry-point alternatives. Done requires a documented, agreed behavior for local TypeScript dependencies and a passing reproduction.

Written by the indexing model from the issue text.

Description

TypeScript upstream

Hi, consider a monorepo that has some TypeScript packages kept in packages/*. Now one of these packages, let's call it b, depends on package a. Package a has entry point set as TS file e.g. src/index.ts.. When trying to bundle such package microbundle fails since it cannot transpile package a as it's declared as a dependency of b and thus it's expected that the package is already bundled up.

I could think of the following solutions:

  1. Only use published npm packages as dependency.
  2. Always point main entry to bundle e.g. dist/index.js.
  3. Keep using TS files as main entry but when bundling, use bundled version i.e. dist/index.js.

I have prepared a small sample monorepo illustrating the issue https://github.com/karolisvram/packages-publishing-sample/ but so far haven't decided on the best solution as all have drawbacks. Ideally, mirobundle would transpile its local dependencies too but as far as I can tell, it's not supported? Any there any other alternatives that I'm missing?

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.