Skip to content

Instantly share code, notes, and snippets.

@AshCoolman
Last active November 28, 2015 17:48
Show Gist options
  • Save AshCoolman/8c192cb4a8f1421b9b28 to your computer and use it in GitHub Desktop.
Save AshCoolman/8c192cb4a8f1421b9b28 to your computer and use it in GitHub Desktop.
Babel 6 es6 modules

Babel 6 es6 modules

Babel 6 was just released! This means that it might take some time for all possible integrations to upgrade. Make sure to check the compatibility of your chosen integration. https://babeljs.io/blog/2015/10/29/6.0.0/

ES6 modules now need the following:

Added to package.json:

  "dependencies": {
    "babel-core": "6.0.12",
    "babel-plugin-transform-es2015-modules-commonjs": "6.0.12",
    "babel-preset-es2015": "6.0.12",
  },

Create .bashrc:

{
  "presets": [
    "es2015",
    "stage-0"
  ],
  "ignore": []
}

Create .bashrc:

{
  "presets": ["es2015"],
  "plugins": ["transform-es2015-modules-commonjs"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment