Switch to eval-source-map (#4930)

This commit is contained in:
Jason Laster
2018-09-20 18:54:50 -04:00
committed by Joe Haddad
parent e8b0ee8080
commit 2ed8eccf08
5 changed files with 57 additions and 3 deletions

View File

@@ -34,7 +34,11 @@ async function map(
});
await settle(
files.map(async fileName => {
const fileSource = await fetch(fileName).then(r => r.text());
const fetchUrl = fileName.startsWith('webpack-internal:')
? `/__get-internal-source?fileName=${encodeURIComponent(fileName)}`
: fileName;
const fileSource = await fetch(fetchUrl).then(r => r.text());
const map = await getSourceMap(fileName, fileSource);
cache[fileName] = { fileSource, map };
})