From 05f408f74d1863396c5e9d45f8ca19427aa0a447 Mon Sep 17 00:00:00 2001 From: CounterFire2023 <136581895+CounterFire2023@users.noreply.github.com> Date: Mon, 29 Apr 2024 10:17:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0source=20map=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E5=88=B0dev=E7=9A=84=E7=9B=B8=E5=85=B3=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + vue.config.js | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/package.json b/package.json index 38c9173..12f4f36 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,7 @@ "eslint-plugin-vue": "^8.0.3", "sass": "^1.32.7", "sass-loader": "^12.0.0", + "source-map-loader": "^5.0.0", "vue-template-compiler": "^2.6.14" } } diff --git a/vue.config.js b/vue.config.js index 613b02e..35b4bbb 100644 --- a/vue.config.js +++ b/vue.config.js @@ -9,6 +9,15 @@ module.exports = defineConfig({ lintOnSave: false, productionSourceMap: false, publicPath: '/', + chainWebpack: (config) => { + config.module + .rule("source-map-loader") + .test(/\.js$/) + .enforce("pre") + .use("source-map-loader") + .loader("source-map-loader") + .end(); +}, // devServer: { // open: false, // // host: '0.0.0.0', // 允许外部ip访问