vobyjs/oby

Circular References

andymans opened this issue · 4 comments

Just an FYI - I'm seeing a (!) Circular dependencies warning when using this lib, mainly around "context.js" by the look of it.

Nice work, though!

Do you have anything that I can use to reproduce the problem?

Hi - this was the stack trace
(!) Circular dependencies
node_modules/oby/dist/context.js -> node_modules/oby/dist/objects/root.js -> node_modules/oby/dist/context.js
node_modules/oby/dist/context.js -> node_modules/oby/dist/objects/root.js -> node_modules/oby/dist/methods/suspended.js -> node_modules/oby/dist/context.js
node_modules/oby/dist/context.js -> node_modules/oby/dist/objects/root.js -> node_modules/oby/dist/objects/observer.js -> node_modules/oby/dist/context.js

I was using a basic rollup setup that takes an ES6 vanilla front end, and just runs babel on it + terser. I'll also take a look at my settings to make sure babel's not doing anything weird.

OK - just checked again with babel set up as babel() versus babel ({exclude:...}). But the warning still appears.

Note that the build still runs ok - it's just a warning. But circular deps are always good to get rid of if poss :-)

I'm closing this. I've done some research, and it seems to be a well-known rollup issue.