# Webpack4## 安装> webpack 4默认不需要配置文件(它吸收了Parcel的思想,零配置)> - npm i -D webpack> - npm i -D webpack-cli## 使用1.入口点/输出文件```//package.json"scripts": { "build1": "webpack" }//cmdnpm run build1//报错: ERROR in Entry module not f
The CLI moved into a separate package: webpack-cli. Please install 'webpack-cli' in addition to webpack itself to use the CLI. -> When using npm: npm install webpack-cli -D -> When using yarn: yarn add webpack-cli -D webpack4.0.1安装问题,提示:The CLI move
本文转自:https://blog.csdn.net/jiang7701037/article/details/79403637 The CLI moved into a separate package: webpack-cli. Please install 'webpack-cli' in addition to webpack itself to use the CLI. -> When using npm: npm install webpack-cli -D -> When usi
2月底的时候,webpack4正式发布了,但是当我们安装之后,使用下面的语句来打包的时候,发现打包失败了 webpack ./src/main.js ./dist/bundle.js 并且给出了下面这段提示: The CLI moved into a separate package: webpack-cli. Please install 'webpack-cli' in addition to webpack itself to use the CLI. -> When using npm:
今天捣鼓webpack4踩到一个弥天大坑:使用html-webpack-plugin打包html的时候一直报 compilation.mainTemplate.applyPluginsWaterfall is not a function ,百度了半天没结果,谷歌一下终于在github上找到了解决方案:https://github.com/jantimon/html-webpack-plugin/issues/841 解决:先安装yarn,然后在项目跟目录下运行: yarn add webpac