K
K
KnightForce2017-10-10 15:01:32
React
KnightForce, 2017-10-10 15:01:32

Is it possible to write React + JSX without Webpack? What are the downsides?

Is it possible to write in React + JSX without Webpack so that everything happens in the browser?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
O
Oleg Drapeza, 2017-10-10
@SuperOleg39ru

https://codepen.io/anon/pen/EwLLbN
Cons - the browser will have to compile the code on the fly, this is a big loss in performance.
Babel allows you to write in JSX, not webpack, so in the codepen example, a script with babel is added.

A
Anton Anton, 2017-10-10
@Fragster

No. This is how vue can do it, and this is not .vue files, but divided into markup and component code

I
ITZver, 2018-04-24
@ITZver

You can, but you need to connect the Babel transpiler. Here is described in more detail

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question