Ideas from MDG: Meteor 1.3, the Meteor Guide, and ES2015 modules

Yes you can! I can 100% guarantee that any layers we build on top of React will be compatible with existing vanilla components. The only downside right now is that there are a lot of nice Meteor packages like Autoform that are tightly coupled with Blaze, but we’ll be working on a transition path for those packages, I think.

2 Likes

Modules! Very good news, they would be a big help to projects.

The biggest way I need to use modules in my projects is to define some specific load order without putting everything into it’s own package. For example, say I have a folder called server/seed/ that will initialize the database with fake data

// seed/games.js
EJSON.parse(Assets.getText('fixtures/games.json')).forEach(() => {
  // some special seeding process here.
});

// seed/players.js
import 'seed/games'; // or something. Basically just load this FIRST.

EJSON.parse(Assets.getText('fixtures/players.json')).forEach(player => {
  Games.find().forEach(game => {})
});

This is why I really dislike auto-include. I would rather just specify what I need in every file.

Do we want to keep the imports directory convention proposed in the PR?

If you mean anything you export has to be in a specific directory, that’s kind of annoying in my honest opinion. Being forced into writing everything a certain way always feels like having no control over the code.