We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When trying to build with webpack, it says there is a syntax error in the given src/index.js:
src/index.js
ERROR in ./src/index.js Module build failed: SyntaxError: Unexpected token (5:16) 3 | import App from './views/App'; 4 | >5 | ReactDOM.render(<App/>, document.getElementById('app')); ^ @ multi ./src/index
The text was updated successfully, but these errors were encountered:
To solve this, it appears that additional libraries are required.
In package.json, under devDependencies:
package.json
devDependencies
"babel-preset-es2015": "^6.6.0", "babel-preset-react": "^6.5.0",
In webpack.config.js, in the loaders object:
webpack.config.js
loaders
query: { presets:['react', 'es2015'] }
Sorry, something went wrong.
No branches or pull requests
When trying to build with webpack, it says there is a syntax error in the given
src/index.js
:The text was updated successfully, but these errors were encountered: