fix(compiler-cli): ensure source-maps can handle webpack:// protocol (#32912)
Webpack and other build tools sometimes inline the contents of the source files in their generated source-maps, and at the same time change the paths to be prefixed with a protocol, such as `webpack://`. This can confuse tools that need to read these paths, so now it is possible to provide a mapping to where these files originated. PR Close #32912
This commit is contained in:

committed by
Andrew Kushnir

parent
6abb8d0d91
commit
decd95e7f0
@ -35,7 +35,7 @@ export function renderSourceAndMap(
|
||||
{file: generatedPath, source: generatedPath, includeContent: true});
|
||||
|
||||
try {
|
||||
const loader = new SourceFileLoader(fs, logger);
|
||||
const loader = new SourceFileLoader(fs, logger, {});
|
||||
const generatedFile = loader.loadSourceFile(
|
||||
generatedPath, generatedContent, {map: generatedMap, mapPath: generatedMapPath});
|
||||
|
||||
|
Reference in New Issue
Block a user