// 需要再vue.config>js加配置
configureWebpack: {
...,
devtool: 'source-map',
output: {
devtoolModuleFilenameTemplate: (info) => {
const resPath = info.resourcePath;
if ((/\.vue$/.test(resPath) && info.allLoaders !== '') || /node_modules/.test(resPath)) {
return `webpack:///${resPath}?${info.hash}`;
}
return `webpack:///${resPath.replace('./src', 'SouceCode')}`;
},
}
},