Disable MakePathsRelative when generating SourceMaps #133
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We got a bug report over on the Umbraco repo about some javascript assets loading super slowly, in testing I managed to hit 10 second load times reliably. A community member did some great digging and found that the cause of it is when the source maps are generated in this comment.
It fails in Nuglify because it will try and make the path relative, even though it's already relative, leading to an exception being thrown for every segment it tries to process making it super slow.
This PR disables the feature making paths relative in Nuglify across the board since as far as I've been able to gather the paths will always be relative when using Smidge, so it shouldn't be needed. If it's not the case and the feature needs to be enabled in certain scenarios it should of course be configurable instead.
After disabling
MakePathsRelative
the time improved from 9-10 seconds down to less than one second.