Closed marlonfan closed 8 years ago
my js file ext is 'jsx'
import React from 'react' class MyApp extends React.Component { render () { return <div />; } } React.render(<MyApp />, document.body)
if i use babel-loader version is 6.*, i see webpack compile error is:
Module build failed: SyntaxError: /Users/marlon/code/freetime/src/app.jsx: Unexpected token (5:15) 3 | class MyApp extends React.Component { 4 | render () { > 5 | return <h1>Wonderful App</h1> | ^ 6 | } 7 | } 8 |
but if i use bable-loader version is 5.*, it compile is successfully
sorry, i added .babelrc file is done.
my js file ext is 'jsx'
if i use babel-loader version is 6.*, i see webpack compile error is:
but if i use bable-loader version is 5.*, it compile is successfully