babel-preset-es2015-riot

The default riot babel preset


Keywords
riot, babel
License
MIT
Install
npm install babel-preset-es2015-riot@1.1.0

Documentation

The default riot babel preset

Build Status

This preset includes all the default babel es2015 plugins Allowing the use of the es2015 modules also in any riot tag

Installation

$ npm install babel-preset-es2015-riot --save-dev

Usage

Add a .babelrc file in the root of your project

{
  "presets": [ "es2015-riot" ]
}

If you want to use the babel helpers you must change the .babelrc file in this way:

{
  "presets": [ "es2015-riot" ],
  "plugins": [ "external-helpers-2" ]
}

Babel 7

If you are using babel 7 you don't need to use this preset at all. You can simply configure your .babelrc in this way:

{
  "presets": [
    [
      "@babel/preset-env",
      {
        "modules": false,
        "targets": [
          // wathever you need to support
          "last 2 versions"
        ]
      }
    ]
  ]
}

Remeber to install via npm the @babel/core@7 and @babel/preset-env@7 dependencies