出现问题:
ERROR in multi main Module not found: Error: Cannot resolve module 'babel-loader' in C:\Users\xxx\git\IMOOC-React\16-07 @ multi main
然后就安装了 babel-loader(最新版):
npm install babel-loader --save
然后运行:
webpack-dev-server --content-base src --inline --hot
出现以下报错:
ERROR in ./src/js/root.js Module build failed: TypeError: fileSystem.statSync is not a function at module.exports (C:\Users\xxx\git\IMOOC-React\16-07\node_modules\babel-loader\lib\utils\exists.js:7:25) at find (C:\Users\xxx\git\IMOOC-React\16-07\node_modules\babel-loader\lib\resolve-rc.js:13:9) at Object.module.exports (C:\Users\xxx\git\IMOOC-React\16-07\node_modules\babel-loader\lib\index.js:113:132) @ multi main
轻松入门 React 开发,React Router 4 与 Webpack 2 完美升级项目
了解课程