bholloway / resolve-url-loader

Webpack loader that resolves relative paths in url() statements based on the original source file
563 stars 71 forks source link

How should the loader handle url pointing to anchor tags? #123

Closed lainas262 closed 5 years ago

lainas262 commented 5 years ago

This is more of a question.

Say you have an inline svg on your site and you have all styling related with that svg in your scss files, and as part of that styling there is a clip-path rule that points to an anchor like this: .st0 { clip-path : url(#XMLID_2_); } currently this throws an error that source-map information is not available at url() declaration. Is this a case that the loader knows how to handle? note - external file urls work just fine like: background-image: url("../../img/logo.png");

bholloway commented 5 years ago

Usually source-map information is not available means that the incoming source-map is somehow corrupt. If you happen to be on windows then you should to look at the windows line breaks problem.

However you've said that external url() works. Does that mean it also works for the clip-path or just that other url() such as background-image work in the same file?

bholloway commented 5 years ago

Anything further on this @lainas262 ?

bholloway commented 5 years ago

Closing for now due to lack of activity.