-
Notifications
You must be signed in to change notification settings - Fork 12k
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
can't consume generated lib when using configured ts paths for imports #11375
Comments
This is actually coming from typescript and is by design.
Check the comment here microsoft/TypeScript#9910 (comment) and microsoft/TypeScript#10866 Seeing this, I would highly discourage using path mapping inside a library and it will make the consumption of the library rather tedious . |
Hi @alan-agius4 thx for your feedback. for summary: |
Yes correct.
On how to implement and use secondary entry points check
https://github.com/dherges/ng-packagr/blob/master/docs/secondary-entrypoints.md
…On Wed, 27 Jun 2018 at 10:26, admir86 ***@***.***> wrote:
Hi @alan-agius4 <https://github.com/alan-agius4> thx for your feedback.
I haven't expected that the compiler rewrite the names. I thought the name
(in my case @dl/l/lib/deep/bar) should be known internally in the module.
I think I expected somthing like an secondary entry point, (I have just
read about it). But probably I confuse something.
for summary:
imports in the lib should be done with relative paths, unless I have a
secondary entry point for a sub module. right?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#11375 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AQv-WkwQuv1RE0RiBGHcPCkNveFKDOQ0ks5uA0GygaJpZM4U30MY>
.
|
Closing as answered by @alan-agius4, thanks! |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)Area
Versions
node: v8.11.1
npm: 6.1.0
Angular CLI: 6.1.0-rc.0
OS: Win10
Repro steps
BarService
inFooComponent
BarService
inFooComponent
by using the namespace@dl/l
(defined in paths area in tsconfig)"@dl/l/*": ["projects/demo-lib/src/*"]
-> see sample demo-lib-appconsume library
BarService
in a consumer componentThe log given by the failure
Desired functionality
it should be possible to make imports using the defined paths in tsconfig.
consuming lib in the demo-lib-app test project via
"demo-lib/*": ["dist/demo-lib/*"]
works fine. but not if the lib is installed in a different project.Mention any other details that might be useful
The text was updated successfully, but these errors were encountered: