DEPRECATED: Please use a more up to date transpiler, such as 6to5-loader.
Transpiles ES6 syntax for webpack.
import bamboo from 'es6!./bamboo.js';
class Panda {
constructor(arg='default') {
this.eat = bamboo;
}
}
export default Panda;
var Panda = require('es6!./panda.js').default;
new Panda().eat();
Or within the webpack config:
module: {
loaders: [
{ test: /\.js$/, loader: 'es6-loader' }
]
}
and then import normally:
import bamboo from './bamboo.js';
npm install es6-loader --save-dev
In lieu of a formal styleguide, take care to maintain the existing coding style.
- 0.2.0 - Using
es6-module-transpiler
andes6-transpiler
to transpile ES6 syntax as well as modules (@jtangelder). - 0.1.0 - Initial release
Copyright (c) 2014 Kyle Robinson Young
Licensed under the MIT license.