Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide definition maps during application development #5620

Closed
tobi-or-not-tobi opened this issue Dec 3, 2019 · 2 comments
Closed

Provide definition maps during application development #5620

tobi-or-not-tobi opened this issue Dec 3, 2019 · 2 comments

Comments

@tobi-or-not-tobi
Copy link
Contributor

tobi-or-not-tobi commented Dec 3, 2019

Customers who use Spartacus (libraries) might have a disadvantage of not having sources available during development. We like to make the Spartacus sources available in the customers IDE to improve the developer experience.

The typescript compiler made an option available to generate declaration maps (--declarationMap), which is solving this problem:

hitting go-to-definition on a declaration from a .d.ts file generated with --declarationMap will take you to the source file (.ts) location where that declaration was defined, and not to the .d.ts.
(https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-9.html#new---declarationmap)

These map files should be generated and published in as part of the Spartacus packages.

I've done a quick test on this, and so far I've not been able to generate the declaration maps. We're getting complains when specifying the declarationMap in the tsconfig about missing declaration or composite. If we try to set these flags, we're getting into other issues. Long story short, we need a dev who can investigate.

@tobi-or-not-tobi
Copy link
Contributor Author

Issue logged at ng-packagr/ng-packagr#1464

@Xymmer Xymmer added this to the needs-milestone milestone Apr 23, 2020
@tobi-or-not-tobi
Copy link
Contributor Author

tobi-or-not-tobi commented Jul 12, 2020

The ng-packagr issue has been closed with release 10.0.0-rc.2. We need to confirm if this enables declaration maps for Spartacus libs.

@dunqan would you mind checking if we already can enable this? i'm not sure if it can be used as the ng-packagr lib is not made final yet. There's a angular-cli ticket as well though.

@Xymmer Xymmer modified the milestones: needs-prioritization, closed-without-action Jun 3, 2021
@Xymmer Xymmer closed this as completed Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants