mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-23 03:29:41 +02:00
pastojs: write sourceMappingURL only if map file enabled, issue 39210
This commit is contained in:
parent
f0f9818824
commit
89e0282856
@ -2815,7 +2815,10 @@ begin
|
||||
if Assigned(PostProcessorSupport) then
|
||||
PostProcessorSupport.CallPostProcessors(aFile.JSFilename,aFileWriter);
|
||||
|
||||
MapFilename:=aFileWriter.DestFilename+'.map';
|
||||
if SrcMapEnable then
|
||||
MapFilename:=aFileWriter.DestFilename+'.map'
|
||||
else
|
||||
MapFilename:='';
|
||||
|
||||
CheckOutputDir(aFileWriter.DestFileName);
|
||||
|
||||
|
@ -603,7 +603,7 @@ begin
|
||||
' rtl.checkVersion('+IntToStr((VersionMajor*100+VersionMinor)*100+VersionRelease)+');',
|
||||
' };',
|
||||
'});',
|
||||
'//# sourceMappingURL=test1.js.map']);
|
||||
'']);
|
||||
if not CheckSrcDiff(ExpectedSrc,aFile.Source,s) then
|
||||
Fail('TTestCLI_Precompile.TestPCU_CheckVersionMain src diff: '+s);
|
||||
end;
|
||||
@ -634,7 +634,7 @@ begin
|
||||
' pas.system.Writeln();',
|
||||
' };',
|
||||
'});',
|
||||
'//# sourceMappingURL=test1.js.map']);
|
||||
'']);
|
||||
if not CheckSrcDiff(ExpectedSrc,aFile.Source,s) then
|
||||
Fail('TTestCLI_Precompile.TestPCU_CheckVersionMain src diff: '+s);
|
||||
end;
|
||||
@ -662,7 +662,7 @@ begin
|
||||
' rtl.checkVersion('+VerStr+');',
|
||||
' var $mod = this;',
|
||||
'});',
|
||||
'//# sourceMappingURL=system.js.map']);
|
||||
'']);
|
||||
if not CheckSrcDiff(ExpectedSrc,aFile.Source,s) then
|
||||
Fail('TTestCLI_Precompile.TestPCU_CheckVersionMain src diff: '+s);
|
||||
end;
|
||||
|
@ -635,7 +635,7 @@ begin
|
||||
' };',
|
||||
'});',
|
||||
'rtl.run();',
|
||||
'//# sourceMappingURL=test1.js.map',
|
||||
'',
|
||||
'']),
|
||||
aFile.Source);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user