P
P
parnas2019-03-09 09:23:04
React
parnas, 2019-03-09 09:23:04

Why does webpack-cli throw an error about loader?

Hello.
I am learning React. According to the lessons on the network, I'm trying to build workflow on webpack without create-react-app.
But, I get an error although I do everything according to the lessons. I may be wrong somewhere. webpack-cli throws this error:

ERROR in ./src/index.js 8:3
Module parse failed: Unexpected token (8:3)
You may need an appropriate loader to handle this file type.
|       render() {
|               return (
>                       <div>
|                               Hello, World!
|                       </div>
 @ multi (webpack)-dev-server/client?http://localhost:8080 (webpack)/hot/dev-server.js ./src main[2]

Link to the source code on github
Thank you in advance for any help.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
alex, 2019-03-09
@parnas

test: /\.jsx?$/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question