You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: support the ng-package.json in secondary entry points (#1406)
* fix: support the ng-package.json in secondary entry points
Currently secondary entry points are breaking "no-implicit-dependencies" TSLint rule, because the
rule is checking for package.json files, which in secondary entry points are anyway just containing
"ngPackage" configuration. Adding the support for ng-package.json removes the need for package.json,
thus TSLint will look correctly in parent package.json file and act accordingly.
fix 1391
* test: add a missing test for the feature-d integration
* docs: document the alternative secondary entry point setup
Copy file name to clipboardExpand all lines: docs/secondary-entrypoints.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,3 +37,8 @@ The contents of `my_package/testing/package.json` can be as simple as:
37
37
No, that is not a typo. No name is required. No version is required.
38
38
It's all handled for you by ng-packagr!
39
39
When built, the primary entry point is imported by `import {..} from '@my/library'` and the secondary entry point with `import {..} from '@my/library/testing'`.
40
+
41
+
### Alternative to `package.json`
42
+
43
+
Alternatively, you could create `ng-package.json` instead of `package.json`.
44
+
This is particularly useful in conjunction with `no-implicit-dependencies` TSLint rule, which will complain if `package.json` does not contain the dependencies used in the secondary entry point, which is misleading since all the dependencies should be mentioned in the primary `package.json`.
0 commit comments