• Stars
    star
    117
  • Rank 301,828 (Top 6 %)
  • Language
    JavaScript
  • Created over 9 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An AMD loader plugin for Babel

Babel (6to5) Plugin

A Babel loader plugin for RequireJS.

Installation

npm install --save-dev requirejs-babel babel babel-plugin-module-resolver-standalone

Usage

Add the paths to configuration:

  paths: {
    es6: '...node_modules/requirejs-babel/es6',
    babel: '...node_modules/@babel/standalone/babel.min',
    'babel-plugin-module-resolver': '...node_modules/babel-plugin-module-resolver-standalone/index'
  }

Reference files via the es6! plugin name:

  define(['es6!your-es6-module'], function(module) {
    // ...
  });