describe: modify absolute path to relative path in source map file.
Feature or Bugfix: Bugfix
Binary Source:Yes
Signed-off-by: youbing54<youbing3@huawei.com>
This commit is contained in:
youbing54 2024-08-13 18:45:01 +08:00
parent 790aeb478a
commit fe420c76a8

View File

@ -47,7 +47,9 @@ const webpackConfig = {
},
output: {
filename: '[name].js',
devtoolModuleFilenameTemplate: 'webpack:///[absolute-resource-path]'
devtoolModuleFilenameTemplate: (info) => {
return `${info.absoluteResourcePath.replace(process.env.projectRootPath + path.sep, '')}`;
},
},
devtool: 'nosources-source-map',
mode: 'development',