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/" + }) + },