I have a few files that export an object to be reused as models. Within some objects I use a model from another file. This works fine as long as the other model doesn't use the other file, but if they do then one becomes undefined
. I figure this is because of a cyclic reference and therefore to avoid mayhem it scraps one of the references.
Here's a dumbed down example:
a.js
import b from './b.js'
export default {
a: b
}
b.js
import a from './a.js'
export default {
b: a
}
Is this possible in any way?