这是配置文件
const path = require('path')
module.exports = {
mode:'production',
entry:'./src/main.js',
output:{
filename:"./build.js",
path:path.resolve(__dirname,"/build")
},
plugins:[
new (require('vue-loader').VueLoaderPlugin)(),
new (require('html-webpack-plugin'))({
template:(__dirname,"/public/index.html"),
filename:'./index.html'
})
],
module:{
rules:[
{ test:/\.css$/, use:["style-loader", "css-loader"] },
{ test:/\.vue$/, use:["vue-loader"]},
{
test:/\.(jpg|png|gif)$/,
type:"asset",
generator:{
filename:'./image/[hash].[ext]'
},
parser:{
dataUrlCondition:{
maxSize:1024*1024
}
}
},
]
}
}
报错信息