marko-js / marko-js/language-server

mtc fails to externalize .d.marko deps when another .d.marko is imported through a .d.ts file

Open
#587 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
44
Forks
12
Avg merge
1h 56m
Merged PRs (30d)
7

Description

Version

mtc 6.1.3

Description

mtc fails to externalize tag-resolved .d.marko dependencies when another .d.marko is imported through TypeScript module resolution.

Reproduction

Repro: https://github.com/caseycarroll/mtc-externalize-err

  • src/components/test.marko uses a marko component through auto tag discovery.
  • src/types.d.ts contains a type import from an unrelated .d.marko file
  • tsconfig contains "include": ["src"],

mtc throws:

File '/Users/cacarroll/code/repros/mtc-externalize-err/node_modules/.pnpm/@ebay+ebayui-core@16.11.2_@ebay+skin@19.30.1_marko@5.39.32_three@0.183.2/node_modules/@ebay/ebayui-core/dist/components/ebay-icon/icons/ebay-search-20-icon/index.d.marko' is not listed within the file list of project '/Users/cacarroll/code/repros/mtc-externalize-err/tsconfig.json'. Projects must list all files or use an 'include' pattern.

importing the type of the same path in the test.marko does not throw the same error.

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.

Research direction

Start with the linked reproduction and its src/components/test.marko, src/types.d.ts, and tsconfig files, then trace how mtc resolves tag-discovered .d.marko dependencies through TypeScript imports. Confirm the failure with the reported setup; done means the dependency is externalized without the tsconfig file-list error.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.