Amezui React编译错误在网页上提示怎么实现?


如图:
clipboard.png

Amaze React版运行gulp后命令后,编译报错会在网页显示,感觉很方便,就是不知道使用哪个插件实现的,各位有了解的吗?

阅读 2.7k
评论
    2 个回答

    找到解决方法了。确实是webpack-hot-middleware自带的功能,只不过不能配合webpack-dev-server,可以配合gulp或express使用。

    Additionally, webpack-hot-middleware displays syntax errors in an overlay, which WebpackDevServer doesn’t do.
    However, you can use WebpackDevServer instead of the custom server just fine.

    具体的可以参考Github工程:react-transform-boilerplate

    PS:使用react-hot-loader

    图片描述