Webpack-Dev-Server提供错误'您可能需要一个合适的加载程序来处理此文件类型' for .jsx file

时间:2016-07-04 06:52:49

标签: gruntjs webpack webpack-dev-server webpack-hmr hot-module-replacement

我正在使用grunt-webpack。尝试启动webpack-dev-server会出现此错误 Module parse failed: /u/saxenat/react-blueprint/src/js/app.jsx Unexpected token (5:16) You may need an appropriate loader to handle this file type.

在你关闭这个问题之前,我只想说:webpack正在捆绑文件。 grunt-webpack插件提供了2个任务:grunt-webpackgrunt-webpack-dev-server。当我在服务器上尝试HMR时,它失败了。否则它工作正常。

我已将babel-loader添加到预设es-2015react

有什么想法吗?

0 个答案:

没有答案