Monorepo (lerna) - circular dependency

Viewed 293

is it possible for a monorepo to have two packages which depend on one another?

E.g.

package_Dashboard

import { table } from 'package_Style'

package_Style

import { style } from 'package_Dashboard'

During development, all seems to be working more or less fine thanks to aliases/references which replace package_Dashboard with ../package_Dashboard'.

I have to not include the dependency in one of the package.json files, because otherwise lerna warns me about a circular dependency. When I'd publish this on npm or similar, this wouldn't work anymore (due to the missing dependency in package.json).

So how does one best solve for a case like this?

Thanks!

0 Answers
Related