From 6b0069f623d81465e3c05cf07bef07ef25dc567f Mon Sep 17 00:00:00 2001 From: chuzhixin <1204505056@qq.com> Date: Wed, 28 Oct 2020 09:54:46 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=85add=20image-webpack-loader?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + vue.config.js | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/package.json b/package.json index 04cc88c..ffe3706 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "eslint-plugin-prettier": "^3.1.4", "eslint-plugin-vue": "^7.1.0", "filemanager-webpack-plugin": "^3.0.0-alpha.4", + "image-webpack-loader": "^7.0.1", "less": "^3.13.1-alpha.1", "less-loader": "^7.0.2", "lint-staged": "^10.5.0", diff --git a/vue.config.js b/vue.config.js index bde8ce5..0fd36c6 100644 --- a/vue.config.js +++ b/vue.config.js @@ -140,6 +140,14 @@ module.exports = { }, ]) .end() + config.module + .rule('images') + .use('image-webpack-loader') + .loader('image-webpack-loader') + .options({ + bypassOnDebug: true, + }) + .end() }) if (build7z) {