diff --git a/src/Smidge.Nuglify/V3DeferedSourceMap.cs b/src/Smidge.Nuglify/V3DeferedSourceMap.cs index 7674f30..e98a4ef 100644 --- a/src/Smidge.Nuglify/V3DeferedSourceMap.cs +++ b/src/Smidge.Nuglify/V3DeferedSourceMap.cs @@ -11,10 +11,10 @@ namespace Smidge.Nuglify /// /// /// Typically the standard V3SourceMap requires that you provide it a list of files to proces up-front and it will return a single source map - /// for them all, however we don't have the ability to tell a single instance up-front which files to process we just know the files when we - /// start processing them. Luckily the underlying V3SourceMap can work with this since anytime Nuglify processes a JS file it will update the - /// underlying V3SourceMap document with a new source and append to it's sources list. - /// + /// for them all, however we don't have the ability to tell a single instance up-front which files to process we just know the files when we + /// start processing them. Luckily the underlying V3SourceMap can work with this since anytime Nuglify processes a JS file it will update the + /// underlying V3SourceMap document with a new source and append to it's sources list. + /// /// So this is deferred because it does not write to the processed JS file, it defers the output and writes to a string builder which can be retrieved later. /// public class V3DeferredSourceMap : ISourceMap @@ -24,20 +24,22 @@ public class V3DeferredSourceMap : ISourceMap public SourceMapType SourceMapType { get; } private readonly V3SourceMap _wrapped; - private readonly StringBuilder _mapBuilder; + private readonly StringBuilder _mapBuilder; private string _mapPath; /// /// Creates a new inline source map /// /// - /// + /// /// public V3DeferredSourceMap(V3SourceMap wrapped, StringBuilder mapBuilder, SourceMapType sourceSourceMapType) { _wrapped = wrapped ?? throw new ArgumentNullException(nameof(wrapped)); _mapBuilder = mapBuilder ?? throw new ArgumentNullException(nameof(mapBuilder)); SourceMapType = sourceSourceMapType; + // Disable relative paths, this will always fail and make source maps super slow. + _wrapped.MakePathsRelative = false; } public void Dispose() @@ -130,4 +132,4 @@ public string GetExternalFileSourceMapMarkup(string mapPath) /// public string SourceMapOutput { get; private set; } } -} \ No newline at end of file +}