Skip to content
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

Potential fix for CSS and SCSS issues #96

Merged
merged 12 commits into from
Jul 28, 2020
Merged

Potential fix for CSS and SCSS issues #96

merged 12 commits into from
Jul 28, 2020

Conversation

martpie
Copy link
Owner

@martpie martpie commented Jul 28, 2020

: includes;
nextCssLoader.issuer.exclude = excludes;
}
nextCssLoader.issuer.or = nextCssLoader.issuer.and ? nextCssLoader.issuer.and.concat(includes) : includes;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this supposed to concat to issuer.or?

you're deleting the and property right after, so I'm assuming this doesn't do anything in the then case.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, we want to use or so it matches the app directory, or one of the directory in the node_modules (the ones supplied as parameters of the plugin) 🤔

I removed the delete just in case.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh I read this wrong. of course, concat is immutable.

@anmonteiro
Copy link

Thanks for putting this together so quickly. I gave this a try and it doesn't seem to fix my issues.

It doesn't seem to work even after applying my suggested fix in #96 (comment). Doing that + adding back the and property with the correct project root directory does, however, make it work for my use case.

@ratheo
Copy link

ratheo commented Jul 28, 2020

It does however fix the issue with yarn workspaces. 👍

@martpie
Copy link
Owner Author

martpie commented Jul 28, 2020

Thank you guys for testing 🙌 I will continue working on this to solve your issue @anmonteiro

@justincy
Copy link

FYI, this PR fixes my issue that I've described here: vercel/next.js#15540

@martpie
Copy link
Owner Author

martpie commented Jul 28, 2020

@justincy are you using Wepback 4 or 5?

@justincy
Copy link

justincy commented Jul 28, 2020

@martpie I assume it's webpack 5 because that's default in Next v9.5, right?

@martpie
Copy link
Owner Author

martpie commented Jul 28, 2020

Well no, it's only opt-in

@justincy
Copy link

@martpie Oh. Then it's probably webpack 4. How do I figure out which version I'm using?

@martpie
Copy link
Owner Author

martpie commented Jul 28, 2020

if you don't know, then it's probably webpack 4 ;)

@martpie
Copy link
Owner Author

martpie commented Jul 28, 2020

@anmonteiro in theory, this should be fixed, can you confirm? Unless the or value is wrong, but I don't think it is

@anmonteiro
Copy link

hey @martpie this still doesn't work as is, but it's now my fault for telling you to not delete the and property.
If you revert that change then it'll work 👍

@martpie
Copy link
Owner Author

martpie commented Jul 28, 2020

You mean if I revert e4f693e it works for you? 🙃

@anmonteiro
Copy link

correct!

@martpie martpie merged commit 97d9f4c into master Jul 28, 2020
@martpie
Copy link
Owner Author

martpie commented Jul 28, 2020

well let's release then!

@martpie martpie deleted the scss-fix-9.5.0 branch November 13, 2020 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants