babel watch SyntaxError: Unexpected token

前端 未结 3 1867
生来不讨喜
生来不讨喜 2020-12-21 03:56

When I uses babel to watch a jsx file. But there is a syntax error.

Before that, I uses react-tools to watch, and everything is fine.

SyntaxError: as         


        
3条回答
  •  执念已碎
    2020-12-21 04:32

    I had a similar issue the other day. It seems that babel now needs some additional plugins to work with react.

    See the answer in this SO question: babel-loader jsx SyntaxError: Unexpected token

提交回复
热议问题