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
const{ parseQuery }=require('loader-utils');module.exports=function(source){constquery=parseQuery(this.resourceQuery);// transform `source` based on the value of `query.color`};
Expected Behavior
The query object in svg-color-loader.js is { color: '#BAAFDB' }. (This used to be the case in css-loader v3.)
Actual Behavior
The query object in svg-color-loader.js is { color: '' }.
I am attempting to upgrade css-loader from v3 to v5. However it now seems to treat the escaped query string value %23BAAFDB differently. Is this a bug in css-loader (i.e. it's mistakenly parsing %23BAAFDB as a URL fragment?) or is there some alternative approach I should use for my downstream loader?
Thanks.
The text was updated successfully, but these errors were encountered:
loader-utils is deprecated, please use const querystring = require('querystring'); and querystring.parse(this.resourceQuery.slice(1)) to parse, but yes, it is bug, WIP on this
Code
webpack.config.js
example.css
svg-color-loader.js
Expected Behavior
The
query
object insvg-color-loader.js
is{ color: '#BAAFDB' }
. (This used to be the case incss-loader
v3.)Actual Behavior
The
query
object insvg-color-loader.js
is{ color: '' }
.Notes
I'm not sure if this is the same issue as #1048.
I am attempting to upgrade
css-loader
from v3 to v5. However it now seems to treat the escaped query string value%23BAAFDB
differently. Is this a bug incss-loader
(i.e. it's mistakenly parsing%23BAAFDB
as a URL fragment?) or is there some alternative approach I should use for my downstream loader?Thanks.
The text was updated successfully, but these errors were encountered: