我正在尝试实现webpack@4.41和babel@8来处理响应脚本。我在捆绑jsx语法方面遇到了麻烦(webpack babel-loader在遇到任何html标记时因错误退出)。
我使用命令:npm run build (webpack -模式生产)
index.js
// Import the wrapper component, and the the creator function
import React from 'react';
import ReactDOM from 'react-dom';
class App extends Rea
我很困惑为什么这个不起作用。我添加了babel-loader和所有的插件。但是我一直收到这个错误:
ERROR in ./src/index.js 5:9
Module parse failed: Unexpected token (5:9)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|
| const App