Phoenixで、Reactを使用しようとしていて、BrunchでJSXのコンパイルエラーが発生。
error: Compiling of js/app.js failed. L29:12 Unexpected token 27 | render(){ 28 | return( > 29 | <div className="App"> | ^ 30 | <div className="App-header"> 31 | <h2>Dash Board</h2> 32 | </div>
Brunchの設定ファイルである、brunch-config.js に下記を追記したら動いた。
// Configure your plugins plugins: { babel: { // Do not use ES6 compiler in vendor code presets: ["es2015", "react"], ignore: [/vendor/] } },
なかなかどうして。