The BabelCompiler constructor in Meteor 1.3 takes options via the extraFeatures parameter. For example, here’s what the ecmascript package does:
Plugin.registerCompiler({
extensions: ['js'],
}, function () {
return new BabelCompiler({
asyncAwait: true,
modules: true
});
});
Plugin.registerCompiler({
extensions: ['jsx'],
}, function () {
return new BabelCompiler({
asyncAwait: true,
modules: true,
react: true
});
});
It’d be nice if there were more options, and a way for us to configure them. Maybe they can live in package.json (since that will now be a common thing in Meteor 1.3+). It’d be nice to, for example, enable stage-0 features, etc. It might look like this:
This would be a great feature to have. I use class properties heavily and really don’t want to refactor my code. It should be easy to turn on simple plugins.
@trusktr can you copy/paste this into a GitHub issue? I definitely want to do this in Meteor 1.3.1.
The Babel 6 plugin system makes configuration much, much easier than it was in Meteor 1.2. In short, I think we can support any configuration as long as it includes the preset babel-preset-meteor, along with any additional plugins you might want. In other words, you won’t be able to remove features that are included in that preset, but you can add as many other features as you like. You might also have to do npm install babel-runtime in your app, but that’s probably not too much to ask