一) 安装bable相关命令
5.1 使用 NPM 配置 React 开发环境
image.png
二) 项目打包编译命令相关的安装
image.png三) 打包运行项目
image.png四) 可能遇到的问题
webpack-dev-server
和webpack
找不到命令 , 需要是用
./node_modules/.bin/webpack
./node_modules/.bin/webpack-dev-server
五)常用命令记录
cd /Users/wanggang/Downloads/幕课网代码coding-83/05-03
647 sudo cnpm install webpack --save
648 sudo cnpm install webpack-dev-server --save
649 webpack
650 ./node_modules/.bin/webpack
651 ls
652 cnpm install
653 sudo cnpm install
654 ./node_modules/.bin/webpack
655 sudo cnpm install --save react react-dom babelify babel-preset-react
656 sudo cnpm install --save babel-preset-es2015
657 ./node_modules/.bin/webpack
658 cnpm install
659 ./node_modules/.bin/webpack
660 ./node_modules/.bin/webpack
661 history
662 webpack-dev-server --save
663 sudo cnpm webpack-dev-server --save
664 cnpm install -g webpack
665 sudo cnpm install -g webpack
666 sudo cnpm install -g webpack-dev-server
667 cnpm install webpack --save
668 cnpm install webpack-dev-server --save
669 webpack-dev-server
670 which webpack-dev-server
671 ls webpack-dev-server.
672 ls webpack-dev-server*
673 find webpack-dev-server
674 find webpack-dev-server
675 ./bin/webpack-dev-server
676 history
677 ./node_modules/.bin/webpack-dev-server
网友评论