Primer on ES6, Modules and Meteor Imports


I don’t very little about ES6, ES6 Modules or Imports.

My project is on Meteor, has no ES6 syntax, no imports. How can I slowly migrate my code to use ES6 syntax and Modules and Imports? Also, why do things work without imports and why should I add in imports?

Where can I find a good primer on how all these work together, within Meteor?


Read the guide, that’s the best pointer.

About why it still works: that’s based on the principle of meteor that updates should not break things uselessly.

As far as I am concerned i don’t see a fully decided stable way of using es6 modules. Personally I would wait a bit unless you need npm modules for your project.

The currently suggested structure is in the guide but the discussion on the forum on things like viewModel are also interesting.


Will you explain this more, why are es6 modules unstable? What about using Imports, everything is working as is, so why add them?


Yes it’s stable working. But there is also some discussion going on how to use it in practice. So if you start a new project or want to invest in it now go for it. If you have a good running project maybe focus on work which adds value to the project itself. Currently it’s not yet “needed” to move.

It’s a priority issue. technically I think it works stable, for sure if you follow the guide.

#5 This is the interesting part why it still works btw.