File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ module.exports = {
2323 sourceMaps [ pathWithoutQuery ] = module [ '_source' ] [ '_sourceMap' ] ;
2424 } ) ;
2525
26-
2726 compilation . hooks . finishModules . tapPromise ( 'All Modules Built' , async ( modules ) => {
2827 for ( const module of modules ) {
2928 const { resource } = module ;
@@ -49,8 +48,8 @@ module.exports = {
4948 let indexOfScriptTag = 0 ;
5049
5150 for ( const line of lines ) {
52- if ( / < s c r i p t / . test ( line ) ) break ;
5351 ++ indexOfScriptTag ;
52+ if ( / < s c r i p t / . test ( line ) ) break ;
5453 }
5554
5655 const shiftedSourceMap = await SourceMapConsumer . with ( scriptSourceMap , null , async ( consumer ) => {
@@ -74,7 +73,7 @@ module.exports = {
7473 else {
7574 original = {
7675 column : originalColumn ,
77- line : originalLine + indexOfScriptTag - 1 ,
76+ line : originalLine + indexOfScriptTag ,
7877 } ;
7978 }
8079
@@ -91,11 +90,13 @@ module.exports = {
9190
9291 return generator . toJSON ( ) ;
9392 } ) ;
93+
94+ scriptSourceMap . mappings = shiftedSourceMap . mappings ;
9495 }
9596 } ) ;
9697 } ) ;
9798 }
9899 } ]
99100 } ;
100101 }
101- } ;
102+ } ;
You can’t perform that action at this time.
0 commit comments