N
N
Ninja Mate2016-01-15 05:42:07
Node.js
Ninja Mate, 2016-01-15 05:42:07

What's the problem, can't configure Webpack-Babel-React?

Save!)
It always gives such an error, it should be something simple, but 8 hours of searching did not help.

B:\Contact form>webpack
Hash: cd11ae8651d90f1215a2
Version: webpack 1.12.11
Time: 549ms
   [0] multi main 52 bytes {0} [built] [1 error]
  [76] ./app/index.jsx 0 bytes [built] [failed]
    + 75 hidden modules

ERROR in ./app/index.jsx
Module parse failed: B:\Contact form\app\index.jsx Line 7: Unexpected token <
You may need an appropriate loader to handle this file type.
| var Hello = require('./Hello.jsx');
| 
| React.render(<Hello />, document.getElementById('content'));
 @ multi main

Here is a link to the project https://github.com/Antibioticvz/SimpleContactFormO...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
vsuhachev, 2016-01-15
@victorzadorozhnyy

jsx-loader and bable-loader are two different things. jsx-loader is not listed in your package. Then, react-hot-loader is used in conjunction with webpack-dev-server, which is also not in package. In general, you have some kind of mess in the config.
Take some modern boilerplate (for example, I like this one ) and see how everything should be.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question