-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Resolve relative paths for preprocessor styles #5829
Conversation
This pull request 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. |
Sorry this fell through the cracks! I'm going to tag it for a milestone and hopefully get back to it soon. 😄 |
I ran this change on an internal TypeScript app, and can confirm it resolves the issue. Might fork react-scripts to use it for now, but getting this merged would be sweeeeeeet. |
Hi everyone, any progress on this? Would be nice to clear out the dependency resources that have had to be moved into a project I'm working on. However the longer this goes unfixed, the less likely that is to happen. |
Rebased |
Revert eslint changes when facebook/create-react-app#6513 will be merged Revert to react-scripts when facebook/create-react-app#5829 will be merged
|
This seems to have issues when using
@import '~example/scss/index.scss';
body {
background: url('../logo.svg');
} Output from
|
@jackwilsdon this is not related to current issue. CRA has this restrictions from the beginning. If CRA would allow relative sources that fall outside |
My apologies @iamandrewluca, I misunderstood this PR as being a potential fix for #5402, which is caused by |
@jackwilsdon no problem. I added a reference in #5402 (comment) |
thank you for this pull request. It also be useful for working with Font Awesome 5 icon library. There is some code in SASS file located, for example, in '/app/src/styles.scss': |
Hi all, sorry this fell through the cracks. I'll follow this up for now on. @iamandrewluca - are you still interested in working on this? If so, let me know and I'll work with you to get it in. |
@mrmckeb yes, still interested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, great. Let me take a look at this over the next few days.
I can see that you've included a demo which is great.
One small comment, otherwise it looks good.
@mrmckeb done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ianschmitz or @iansu - any concerns on this one?
Still waiting for feedback on this one, but I'd like to get it out in 3.1. @ianschmitz was away, but hopefully he can take a look this week. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a quick change otherwise looks good.
preprocessor will output sourceMap by default then check if sourceMaps are needed on resolve-url-loader Fixes #4653
preprocessor will output
sourceMap
by defaultthen check if
sourceMap
are needed on resolve-url-loaderissue demo: https://github.com/iamandrewluca/cra-scss-relative-problem
Fixes #4653