Skip to content

riot/babel-preset-es2015-riot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

The default riot babel preset

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published