-
-
Notifications
You must be signed in to change notification settings - Fork 603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
URL query params no longer parsed correctly with URL path in version 2.0.0+ #883
Comments
Looks like a bug, need fix |
@rishitank Can't reproduce, please create minimum reproducible test repo |
Looks you have loader what break url |
Yes after updating css loader to 2.1.0 the above error occurs. Reverting to version 1.0.1 the error does not occur. I've isolated the issue to css loader, the error is caused by bad output from css loader as mentioned in the error message. |
@rishitank Can't reproduce your problem, please create minimum reproducible test repo I can send a PR with tests and provide link on CI and you can see what is works as expected, so i can't help you without minimum reproducible test repo |
@evilebottnawi you may try this test repo: https://github.com/rishitank/test If you try running |
@rishitank why you use |
@evilebottnawi If I try without |
@evilebottnawi it works without |
@rishitank for relative directory use |
@evilebottnawi module resolution is needed to determine the |
@rishitank |
@evilebottnawi after some configuration changes, I'm able to get this working now. It seems |
@rishitank 👍 Can we close issue? |
@evilebottnawi yes |
Sorry to comment on a closed issue, but I'm having the exact same problem and removing @evilebottnawi those variables are made to send the path to the icons as parameter so the lib (bootstrap or font-awesome) can have the correct path for the fonts. Do you have any clue on how to solve this? Here is the full stacktrace:
If you prefer I can open a new ticket with those informations. Thanks ! |
@wmarques looks you use old version of |
Something wrong in @font-face {
/* Other code */
src: url("./font-path(\"bootstrap/glyphicons-halflings-regular.eot\"")
} Bootstrap should have variable for assets path, maybe you have invalid value of variable |
@evilebottnawi Thanks for your fast answer ! I'm at 2.1.1 which seems to be the latest version. Btw it works on the 1.0.1 version.
It's strange, my variable is : I have other variables for the same usage:
Those one works but the bootstrap one is failing, maybe because bootstrap requires the font with the additional |
@wmarques can you create minimum reproducible test repo? Something wrong with |
@evilebottnawi Do you have any "sample" repo that I can clone ? With a basic webpack config and SASS |
@wmarques just clone any boilerplate, or you can provide link on own repo where you faced with issue (just remove all security data if you have their in repo) |
@evilebottnawi sorry for the time, here it is: https://github.com/wmarques/css-loader-bug |
@wmarques please open new issue, thanks |
@evilebottnawi done :) |
Expected Behavior
When importing a library such as Bootstrap-sass or Font-awesome using SASS, these modules use query parameters in the URLs in order to extract specific styles. For example if I look in node_modules/font-awesome/css/font-awesome.css I see something like this:
Actual Behavior
However when simply importing this module and setting the correct fa-font-path, it seems that css-loader is processing the query parameters incorrectly:
Furthermore, it appears that in some cases the string passed to require terminates with \"" instead of "
The text was updated successfully, but these errors were encountered: