From 9fe65778e4c44460784c1a5a65a4b145879cd918 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=88=90?= Date: Wed, 3 Aug 2022 15:47:08 +0800 Subject: [PATCH] init --- vue.config.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/vue.config.js b/vue.config.js index 251a327..df267ba 100644 --- a/vue.config.js +++ b/vue.config.js @@ -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/" + }) + },