Open
Description
🚀 Feature request
Command (mark with an x
)
- newbuildserveteste2egenerateaddupdatelintxi18nrunconfighelpversiondoc
Description
Creating a secondary entry points for libraries is a manual effort with a risk of misconfiguration of unit testing environment.
In order to get a proper coverage report for all the libraries, the following needs to be adjusted:
- in
test.ts
the context path should be changed:const context = require.context('../', true, /\.spec\.ts$/);
- in
angular.json
thesourceRoot
path should be changed:"sourceRoot": "projects/lib-name",
(no/src
)
Describe the solution you'd like
Create a schematic that generates the secondary entry point for the given library.
I would be happy to provide a PR if this get's greenlit.
Activity
angular-robot commentedon Feb 2, 2022
Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends.
Find more details about Angular's feature request process in our documentation.
angular-robot commentedon Feb 21, 2022
Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage.
We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package.
You can find more details about the feature request process in our documentation.
ertunga commentedon Jul 16, 2022
I've lost so much time because of this. It always requires manual effort to set things up with secondary entry points or am I missing something? there is ambiguity around folder structure of the library, unit tests stop working, you can't get the desired import path you want when you are consuming the library... I think nx has some generators to help develop libraries with second entry points, something like that can be added to CLI as well.