增加source map导出到dev的相关配置

This commit is contained in:
CounterFire2023 2024-04-29 10:17:15 +08:00
parent ff61a47e39
commit 05f408f74d
2 changed files with 10 additions and 0 deletions

View File

@ -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"
}
}

View File

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