open-wc / custom-elements-manifest

Custom Elements Manifest is a file format that describes custom elements in your project.
https://custom-elements-manifest.open-wc.org/
226 stars 37 forks source link

[Analyzer]: Module resolution issue with dependencies and TypeScript #224

Closed KonnorRogers closed 8 months ago

KonnorRogers commented 8 months ago

Checklist

Completing the items above will greatly improve triaging time of your issue.

Expected behavior

No error messages, full custom-elements.json

Hi there! I hit the following issue when using CEM with dependencies and with TypeScript:

Issues

There are 3 scenarios when custom-elements.json fails to generate, and 1 scenario where it properly generates based on my minimal reproduction

Success

Failures

Failures are defined as an empty custom-elements.json

  1. dependencies: true, No override on module creation. The custom-elements.json appears correctly, but the console has an error about resolution.
  2. dependencies: false, overrideModuleCreation set to ts.createProgram. Says successfully created and no error message, but the custom-elements.json is empty.
  3. dependencies: true, overrideModuleCreation set to ts.createProgram. Says successfully created, has an error message, and the custom-elements.json is empty.

Reproduction

https://github.com/KonnorRogers/cem-typescript-issue

KonnorRogers commented 8 months ago

config.compilerOptions was the secret ticket šŸ¤”