今天自己尝试搭建项目框架实现hmr时报了两个错
控制台报错
Uncaught ReferenceError: React is not defined
控制台报错
ERROR in (webpack)/hot/dev-server.js
Module not found: Error: Can't resolve './emitter' in '/Users/lorry/workspace/up/pine_soot/node_modules/webpack/hot'
@ (webpack)/hot/dev-server.js 50:18-38
@ multi (webpack)-dev-server/client?http://localhost:9000 (webpack)/hot/dev-server.js ./src/pages/index/index.tsx
ERROR in (webpack)/hot/dev-server.js
Module not found: Error: Can't resolve './log' in '/Users/lorry/workspace/up/pine_soot/node_modules/webpack/hot'
@ (webpack)/hot/dev-server.js 11:11-27
@ multi (webpack)-dev-server/client?http://localhost:9000 (webpack)/hot/dev-server.js ./src/pages/index/index.tsx
ERROR in (webpack)/hot/dev-server.js
Module not found: Error: Can't resolve './log-apply-result' in '/Users/lorry/workspace/up/pine_soot/node_modules/webpack/hot'