Skip to content

Instantly share code, notes, and snippets.

@mikemurray
Created March 5, 2016 16:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikemurray/1a98f6ffc75c99c6a65d to your computer and use it in GitHub Desktop.
Save mikemurray/1a98f6ffc75c99c6a65d to your computer and use it in GitHub Desktop.
Configure meteor babel (meteor 1.3 beta 11)

What am I doing, I dont even?

You're only adding 3 lines of code in this example.

In package.js (inside the Npm.depends)

'babel-preset-stage-0': '6.5.0'

In babel.js (top of file)

const stage0Preset = Npm.require("babel-preset-stage-0")

In babel.js (inside getDefaultOptions function)

options.presets.push(stage0Preset)
// ... (add to top of file)
const stage0Preset = Npm.require("babel-preset-stage-0")
// ... (code omitted for brevity)
function getDefaultOptions(extraFeatures) {
// ... (code in function omitted for brevity)
// ... Right before the return, push your preset into the presets array of options
options.presets.push(stage0Preset)
return options;
}
// ...
// ... (code omitted for brevity)
Npm.depends({
'meteor-babel': '0.7.2',
'babel-preset-stage-0': '6.5.0' // I added this line
});
// ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment