mirror of
https://gitee.com/openharmony/developtools_ace_js2bundle
synced 2024-11-23 07:20:22 +00:00
!643 fix absolute path in sourcemap.
Merge pull request !643 from lihong/sourcemap
This commit is contained in:
commit
7ba8bc161e
@ -181,7 +181,10 @@ let config = {
|
||||
filename: '[name].js',
|
||||
pathinfo: false,
|
||||
devtoolModuleFilenameTemplate: (info) => {
|
||||
return `${info.absoluteResourcePath.replace(process.env.projectRootPath + path.sep, '')}`;
|
||||
const newInfo = info.absoluteResourcePath.replace(process.env.projectRootPath + path.sep, '')
|
||||
.replace(process.env.projectRootPath + path.sep, '')
|
||||
.replace(path.join(__dirname, path.sep), '');
|
||||
return newInfo;
|
||||
},
|
||||
globalObject: 'globalThis'
|
||||
},
|
||||
@ -405,7 +408,10 @@ module.exports = (env) => {
|
||||
})],
|
||||
});
|
||||
config.output.devtoolModuleFilenameTemplate = (info) => {
|
||||
return `${info.absoluteResourcePath.replace(process.env.projectRootPath + path.sep, '')}`;
|
||||
const newInfo = info.absoluteResourcePath.replace(process.env.projectRootPath + path.sep, '')
|
||||
.replace(process.env.projectRootPath + path.sep, '')
|
||||
.replace(path.join(__dirname, path.sep), '');
|
||||
return newInfo;
|
||||
}
|
||||
config.output.sourceMapFilename = '_releaseMap/[name].js.map'
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user