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
Using url in SCSS mixin in another file doesn't import files correctly #7777
This should try to lookup src/jsx/routes/some-image.webp and src/jsx/routes/some-image.jpg but it instead tries to look for src/scss/some-image.webp and src/scss/some-image.jpg respectively.
I believe this is due to the introduction of resolve-url-loader in #5829 . The motivation of that package is to support a feature-based directory structure, where relative paths in imported scss files are resolved relative to the importee, not the importer. However, as noted at https://www.npmjs.com/package/resolve-url-loader#user-content-mixins that breaks mixins
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.
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>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABGG54FQZUZKZYRT4QVBXM3QVE3PRANCNFSM4I5EQ2DQ>
.
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.
Activity
robertvansteen commentedon Oct 3, 2019
Have you tried using a relative path instead? Like
./some-image?Dakkers commentedon Oct 3, 2019
@rovansteen yes; using the code from my example repo and changing the mixin use to:
results in the same
Can't resolve <...>errorthinkerelwin commentedon Oct 5, 2019
got similar problems too,
my case is I've a main scss in 'src/assets/scss/App.scss'
it contains
@import "./components/icons";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
texas697 commentedon Oct 15, 2019
need help as well
tkalliom commentedon Oct 24, 2019
I believe this is due to the introduction of
resolve-url-loaderin #5829 . The motivation of that package is to support a feature-based directory structure, where relative paths in importedscssfiles are resolved relative to the importee, not the importer. However, as noted at https://www.npmjs.com/package/resolve-url-loader#user-content-mixins that breaks mixinsDakkers commentedon Oct 24, 2019
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? 🤦♂
stale commentedon Nov 23, 2019
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.
Dakkers commentedon Nov 23, 2019
sepehrity commentedon Dec 6, 2019
I have the same problem. Any update on this issue?
stale commentedon Jan 5, 2020
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.
Dakkers commentedon Jan 5, 2020
it's still an issue 👎
ianschmitz commentedon Jan 31, 2020
Fixed in #8281. Released in 3.3.1