Files
note/2019/12/webpack.md
2019-12-01 15:51:01 +08:00

22 lines
586 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
### 使用yarn 安装 webpack
1. yarn的使用
yarn add 安装
yarn global add 全局安装
yarn add 软件包名+@版本号 指定版本安装
yarn remove +xxx 移除
yarn init 初始化
yarn upgrade +xxx 升级
所以yarn 安装webpack 需要运行yarn global add webpack
2.webpack使用
用yarn 安装好后 终端运行 webpack 会报错webpack命令找不到
使用npm install webpack -g 也就是使用npm全局安装webpack时不会报错。 是因为安装node 时会自动把npm的环境变量加入系统变量中
window系统