- vue.config.js中defaultConfig里添加
configureWebpack(config) {
config.devtool = "cheap-module-source-map";
}
- Vue2还需要做个文件映射,在launch.json中添加
"sourceMapPathOverrides": {
"webpack://xxxx/src/*": "${workspaceFolder}/src/*"
}
configureWebpack(config) {
config.devtool = "cheap-module-source-map";
}
"sourceMapPathOverrides": {
"webpack://xxxx/src/*": "${workspaceFolder}/src/*"
}