-
-
Notifications
You must be signed in to change notification settings - Fork 431
Description
Example repo: henrahmagix/sass-loader-newline-bug-example
I had installed Mavo via npm and was importing its styles and having webpack compile it all into my app. I found in certain situations the stylesheet wouldn't apply to the page, so I tried to track down the problem and found that newlines in an inline svg base64 string were not being escaped correctly, resulting in a broken stylesheet.
In trying to track down the core problem, I made an example repo, and have found that it's not an issue with node-sass directly (as far as I can tell): please see dist/app.css.
I'm not entirely sure why importing from the node_modules
directory – via sass-loader's ~
import resolver or from a relative path – is causing this issue. However, compiling Mavo's styles myself with node-sass results in no newlines at all, which means the stylesheet applies (see mavo-direct.css and mavo-imported.css) and it's not a core issue with node-sass.
Practically speaking though, my problem has been solved by a newer release of Mavo (see mavoweb/mavo#243 and 44592ba), but I thought it best to report this odd issue here as it may affect others.
Thanks for the great plugin!
Cheers,
Henry
EDIT: added extra node-sass direct compilations to example repo, updated links here