This commit is contained in:
张成
2022-08-03 15:47:08 +08:00
parent 5af40caa79
commit 9fe65778e4

View File

@@ -10,7 +10,7 @@ const BASE_URL = process.env.NODE_ENV === "development" ? "/" : "/";
const sourceMap = process.env.NODE_ENV === "development";
module.exports = {
publicPath : BASE_URL,
publicPath: BASE_URL,
// 如果你不需要使用eslint把lintOnSave设为false即可
lintOnSave: false,
chainWebpack: (config) => {
@@ -22,14 +22,17 @@ module.exports = {
.use('image-webpack-loader')
.loader('image-webpack-loader')
.options({
bypassOnDebug: true
bypassOnDebug: true,
})
config.module.rule('images').use('url-loader').loader('url-loader').options(
{ limit:2,esModule:false}
)
config.module.rule('images').use('url-loader').loader('url-loader').options({
limit: 2,
esModule: false,
outputPath: "img/"
})
},