最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

angular - How to import NX lib inside another lib? - Stack Overflow

programmeradmin1浏览0评论

I am using nx monorepo with angular. I have this in my tsconfig.base.json

compilerOptions": { "paths": { "@frontends/commons": ["libs/commons/src/index.ts"], "@frontends/designsystem": ["libs/designsystem/src/index.ts"],

And this path work in every nx app.

But same path doesn't work inside Commons lib. I tried to find the solution but didn't succeed

I tried adding the design system library in two ways: first, by including it in the implicitDependencies array of the common library (i.e., "implicitDependencies": ["designsystem"]), and second, by specifying it as a peer dependency in the common library’s package.json (i.e., "peerDependencies": { "@frontends/designsystem": "0.0.1" }).

Could someone please explain the correct way to do this?

发布评论

评论列表(0)

  1. 暂无评论