标签:using microsoft webpack 命令 .config details 配置文件 please 微软雅黑
本文转自: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 using yarn: yarn add webpack-cli -D
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
解决方案:
提示:
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
意思是CLI被移动到了一个专门的包 webpack-cli里了。 请安装webpack-cli 的除了webpack本身使用cli 当用npm时,使用npm install webpack-cli -D安装。 当用yarn时,使用yarn add webpack-cli -D安装。
解决办法:全局安装webpack-cli npm install webpack-cli -g
就能提示出版本号了。
npm install webpack-cli -D
npm install webpack -D
不要使用webpack命令,如:webpack demo01.js bundle01.js,不能再执行了。
webpack.config.js里的配置,不再支持 module下的loaders,需要把loaders改成rules。
即如下:
module: { rules: [ //针对css文件,进行对应的loader处理 { test: /\.css$/, loader: "style-loader!css-loader" } ] }
[转]webpack4.0.1安装问题和webpack.config.js的配置变化
标签:using microsoft webpack 命令 .config details 配置文件 please 微软雅黑
原文地址:https://www.cnblogs.com/freeliver54/p/9013320.html