question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[DRAFT / DISCUSSION] Intra-package dependencies (between entry points)

See original GitHub issue

Type of Issue

[ ] Bug Report
[x] Feature Request

Description

I wonder how to handle the dependencies here. I have a @org/components root package, and I would like to have @org/components/shared for shared utilities and stuff. The root package can import stuff from shared without generating duplicated compile code? Is there a way to set up this kind of “dependency”?

Motivation

Allow dependencies between entry points of the same package.

Expected Behaviour

By TypeScript AST Traversal, detect whether @org/components depends on another entry point within the same package, e.g. @org/components/shared.

Then create a build graph, i.e. @org/components/shared is required to be built before @org/components.

Then, we run the transformation process for packages w/o inter-entry-point deps first. When running the transformation process for dependent packages, configure tsc compilerOptions.paths to point to a FESM bundle of its dependency.

Version Information

ng-packagr: 2.0.0-rc.x

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:7
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
dhergescommented, Dec 17, 2017

So I started a first draft in #419. Ideas and thoughts?

1reaction
alan-agius4commented, Dec 9, 2017

From my point of view, if you have have something that can be shared/re-used I’d say create a separate package rather than a separate entry point. But that’s just my opinion.

And yeah with compilerOptions.paths it is possible to be done, I am doing something similar for a mono-repo

Read more comments on GitHub >

github_iconTop Results From Across the Web

Creating Secondary Entry Points for your Angular Library
The problem: Client needs to install ALL peer dependencies from the library. Suppose we have an Angular application that wants to consume my- ......
Read more >
angular-cli library create secondary entry point - Stack Overflow
When built, the primary entry point is imported by import {..} from '@my/library' and the secondary entry point with import {.
Read more >
1EdTech GLC Common Cartridge v1.1 Profile: Implementation
The file that serves as the entry point for accessing the information about a Learning Application Object required to import the Learning Application...
Read more >
Python Entry Points Explained - Amir Rachum's Blog
iterates over all the entry points that were registered under the name "snek_types" .
Read more >
Dependency Management in Go - GitLab Docs
In an artifact-based dependency management system, packages consist of artifacts generated from source code and are stored in a separate repository system ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found