@bugsnag/source-maps
Advanced tools
Comparing version 2.3.0 to 2.3.1
@@ -49,4 +49,4 @@ "use strict"; | ||
// don't look up sources for virtual webpack files | ||
if (!/^webpack:\/\/\/webpack/.test(p)) { | ||
const absoluteSourcePath = path_1.default.resolve(path_1.default.dirname(sourceMapPath), p.replace(/webpack:\/\/\/\.\//, `${projectRoot}/`)); | ||
if (!/^webpack:\/\/(.*)\/webpack/.test(p)) { | ||
const absoluteSourcePath = path_1.default.resolve(path_1.default.dirname(sourceMapPath), p.replace(/webpack:\/\/.*\/\.\//, `${projectRoot}/`)); | ||
source = yield fs_1.promises.readFile(absoluteSourcePath, 'utf-8'); | ||
@@ -53,0 +53,0 @@ } |
@@ -39,5 +39,6 @@ "use strict"; | ||
map.sources = map.sources.map(s => { | ||
if (/^webpack:\/\/\/webpack/.test(s)) | ||
// leave sources for virtual webpack files untouched | ||
if (/^webpack:\/\/(.*)\/webpack/.test(s)) | ||
return s; | ||
const absoluteSourcePath = path_1.default.resolve(path_1.default.dirname(sourceMapPath), s.replace(/webpack:\/\/\/\.\//, `${projectRoot}/`)); | ||
const absoluteSourcePath = path_1.default.resolve(path_1.default.dirname(sourceMapPath), s.replace(/webpack:\/\/.*\/\.\//, `${projectRoot}/`)); | ||
return absoluteSourcePath.replace(projectRoot, '').replace(/^(\/|\\)/, ''); | ||
@@ -44,0 +45,0 @@ }); |
{ | ||
"name": "@bugsnag/source-maps", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"description": "CLI and JS library for uploading source maps to Bugsnag", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
2289
161087
79