Replies: 1 comment 2 replies
-
Because it is a bug on |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have found an issue where in certain conditions, webpack with sass-loader using the sass implementation works but sass-embedded does not, and initially raised the issue with example in sass-loader (webpack-contrib/sass-loader#1203). Based on the below, I've some questions about how webpack resolution works for nested node_modules folders
Certain conditions are that you have a dependency in a nested
node_modules
folder of a dependency, and there is also a dependency called by more than one of the other dependencies (unrelated to the nested one) - the demo repo below has a basic mockup of this structureAs the findings in sass-loader where that what is returned from
prev
in sass-embedded were wrong, I put together a second example that used sass and sass-embedded without the use of loaders to help the owners of sass debug.However, with this I found that neither sass nor sass-embedded are finding the nested
node_modules
folder without it being explicitly set inincludePaths
(which wasn't a big surprise). As the place in sass-loader whereprev
is showing up the wrong thing is in thegetWebpackImporter
, I think there may be something happening in webpack that is helping sass work but for whatever reason is not working for sass-embedded.What I am wondering:
node_modules
folders work? (node_modules
is mentioned in quite a lot of places in the codebase, there's nothing I spotted in the docs that goes into this level of internal detail)Repos to demonstrate issues:
Version with webpack, loaders and sass / sass-embedded, where sass works and sass-embedded does not for nested node_modules folders when there is a dependency called more than once elsewhere: https://github.com/debugwand/sass-embedded-bug
Version with no webpack or loaders, where neither sass nor sass-embedded works unless you list the nested node_modules folder explicitly in
includePaths
https://github.com/debugwand/sass-embedded-bug-noloadersBeta Was this translation helpful? Give feedback.
All reactions