npm install webpack -D
npm install webpack-cli -D
配置好 webpack.config.js 文件
但执行 webpack 报错
zsh: command not found: webpack
因为以后环境变量中,没有找到对应的命令,解决办法如下:
➜ echo ‘export PATH=”./node_modules/.bin:$PATH”‘ >> ~/.zshrc
➜ source ~/.zshrc
npm install webpack -D
npm install webpack-cli -D
配置好 webpack.config.js 文件
但执行 webpack 报错
zsh: command not found: webpack
因为以后环境变量中,没有找到对应的命令,解决办法如下:
➜ echo ‘export PATH=”./node_modules/.bin:$PATH”‘ >> ~/.zshrc
➜ source ~/.zshrc