webpack打包html中图片不显示
1.首先看下自己的webpack版本,webpack5以上需要用html-withimg-loader 打包html中的图片
/**
* 开发环境配置,代码可以运行就可以
*/
const {resolve } = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: './src/js/index.js',
// 打包后所有的输出都在
原创
2021-05-12 09:06:33 ·
817 阅读 ·
2 评论