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) {
// ...
});