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访问