Questions tagged «webpack-4»

6
Webpack 4-如何配置最小化?
Webpack 4附带以下语句: webpack.optimize.UglifyJsPlugin已被删除,请改用config.optimization.minimize。 足够公平,但是我找不到有关配置在后台运行的UglifyJsPlugin实例的任何信息,例如,更改缓存目录。能做到吗?

2
当我在webpack中使用文件加载器和HTML加载器时。图像的src属性将类似于“ [对象模块]”
我正在从头开始使用webpack4做一个项目。但是当我尝试在html文件中显示图像时。我遇到了一个有线问题:之后npm run build。图片标签的src将被构建为<image src="[object Module]"。html部分是: <img src="images/main_background.jpg"> 该webpack.config.js是这样的: // ignore ... { test: /\.html$/, use: [ {loader: 'html-loader'} ] }, { test: /\.(jpeg|jpg|png)$/, use: [ 'file-loader' ] } 以及这两个加载程序的版本: "file-loader": "^5.0.2", "html-loader": "^0.5.5", 我不知道是什么问题...
10 webpack-4 
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.