-
-
Notifications
You must be signed in to change notification settings - Fork 27k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Using url in SCSS mixin in another file doesn't import files correctly #7777
Comments
Have you tried using a relative path instead? Like |
@rovansteen yes; using the code from my example repo and changing the mixin use to:
results in the same |
got similar problems too, my case is I've a main scss in 'src/assets/scss/App.scss' it contains
then in 'src/assets/scss/components/icons.scss' it contains
the image is stored in 'src/assets/img/pc_w_icon_condition_done_large.png' when I update my react-script from 3.0.1 to 3.2.0, got an error when 'npm run build', says can't find that image |
need help as well |
I believe this is due to the introduction of |
it's unfortunate to see that their solution is "You will need to work around this" - how? should I just copy and paste that mixin in every single file? 🤦♂ |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
Pls don't mark this as stale :'(
…On Sat, Nov 23, 2019, 9:17 AM stale[bot], ***@***.***> wrote:
This issue has been automatically marked as stale because it has not had
any recent activity. It will be closed in 5 days if no further activity
occurs.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#7777?email_source=notifications&email_token=ABGG54DRTIPUISW3A2PUWSDQVE3PRA5CNFSM4I5EQ2D2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEE7WAAA#issuecomment-557801472>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABGG54FQZUZKZYRT4QVBXM3QVE3PRANCNFSM4I5EQ2DQ>
.
|
I have the same problem. Any update on this issue? |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
it's still an issue 👎 |
Fixed in #8281. Released in 3.3.1 |
Reopened from #7598 because I didn't see an option to actually re-open that issue.
Describe the bug
Using an SCSS mixin (located in another file) that uses the
url
function makes the file unable to be found. Example:This should try to lookup
src/jsx/routes/some-image.webp
andsrc/jsx/routes/some-image.jpg
but it instead tries to look forsrc/scss/some-image.webp
andsrc/scss/some-image.jpg
respectively.This was working prior to 3.1.x.
Did you try recovering your dependencies?
yes
Which terms did you search for in User Guide?
N/A
Environment
Steps to reproduce
See code snippet above. Alternatively, see https://github.com/Dakkers/create-react-app-issue-7598
Expected behavior
It should import the local image files correctly
Actual behavior
It does not import local image files correctly
Reproducible demo
https://github.com/Dakkers/create-react-app-issue-7598
The text was updated successfully, but these errors were encountered: