What about using lazy loading to solve circular dependencies.
Taylor Goolsby
1

If I understand it correctly, I think it could work, but now you have bigger problems: 1. All call sides need to have inline-requires, which is very hard to keep track of and very easy to forget. 2. You can’t bundle your code with webpack or other bundler, as those would hoist the require’s anyway. 3. You are looking yourself into CommonJS specific semantics, which won’t work in ES module based environments