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.
I originally raised a request for relative url rewriting in issue #19, and it looks like several other people have had similar requests since then. The issue was originally closed due to being outside the scope of this project.
That is perfectly understandable, however, as it turns out there is very little that needs to be done in order to allow someone else to implement a
result-url-loader-plugin
-esque solution on their own. Specifically, the only thing that needs to exist is that the sourcemap generated by sass needs to be exposed to thetransform
method of this plugin.So that's what this PR does: it simply exposes the source maps if any are generated (setting the
sourceMap
property tosourceMap: 'out.map'
will generate them, for example) as an optional parameter of the transform method. It's fully backward compatible with any current uses of this plugin.And if anyone comes asking for relative url writing, you can tell them all of the pieces necessary to do so are now available (which I'm planning on doing. If it works, I'll release a plugin for your plugin).