All Projects → riot → babel-preset-es2015-riot

riot / babel-preset-es2015-riot

Licence: MIT license
The default riot babel preset

Programming Languages

javascript
184084 projects - #8 most used programming language

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].