I just started using ES6 modules and was wondering if it's bad practice if I do something like this:
pois.js:
import './methods.js';
export default Pois = new Mongo.Collection("pois");
methods.js:
import Pois from './pois.js';
Meteor.methods({
'pois.insert' (text) {
Pois.insert({text: text});
}
})
This seems like a circular reference to me. Is this resolved internally? Can I leave it like that? The reason I have it that way is because methods.js depoends on pois.js and pois.js is later imported elsewhere and I want it to include all further poi related references.