For a quick test, i've created my main.jsx file written in ES6 for my ReacJS app:
main.jsx
import React from 'react'
import { render } from 'react-dom'
import { Router, Route, Link } from 'react-router'
class TestComponent extends React.Component {
render() {
return <div className="test">...</div>;
}
}
Then i compile my code with browserify and babel:
browserify -t babel main.jsx -o public/js/bundle.js
I get this error: Error: Cannot find module 'babel'
What's the cleanest way to compile ES6 code with ReactJS?