You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Newlines in inline svg base64 not escaped when imported #490
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
Thanks @evilebottnawi! I've just updated the example repo with some extra node-sass compilations to compare against, and edited my comment to link to those files now.
Activity
alexander-akait commentedon Aug 23, 2017
@henrahmagix tomorrow i investigate this. Thanks for issue!
henrahmagix commentedon Aug 23, 2017
Thanks @evilebottnawi! I've just updated the example repo with some extra node-sass compilations to compare against, and edited my comment to link to those files now.
Cheers!
alexander-akait commentedon Sep 2, 2017
@henrahmagix thanks for issue, seems problem not in
sass-loader, because usingrequire('fs').writeFileSync('test.css', result.css.toString())before https://github.com/webpack-contrib/sass-loader/blob/master/lib/loader.js#L79 , output:It is valid css and all work fine. Problem located in
css-loader, i can try to found problem and fix her incss-loader.alexander-akait commentedon Jan 12, 2018
@henrahmagix should be fixed in
css-loader, feel free to reopen if problem still exist. Thanks for issue!