-
Notifications
You must be signed in to change notification settings - Fork 69
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
Yarn pnp cannot resolve ~
imports
#168
Comments
I'm not familiar with yarn pnp, but open to accepting contributions if it's straightforward and makes sense to include in the tool. |
Any more details? A reproduction repo would be helpful. Does this work outside of this tool? This seems like a general issue with potential with SASS and Yarn PNP. Will close soon as unclear how to move forward with the current information. |
@skovy the issue is that It would be good to make the resolver use I implemented this once before, for an internal project. I'll link the implementation here in case it is helpful https://gist.github.com/GeorgeTaveras1231/8e18ef6eba9495f077ce03e94a00e333 Update: I resolved the issue on my repo by using the importer implementation I shared above and using the |
Thanks, @GeorgeTaveras1231 for the details, that's really helpful! I would be open to a more robust, standard resolution strategy using the same approach other tools use. Ideally, we'd use node APIs or well-established packages to avoid needing to reimplement this. I have no plans of working on this, but I'd be open to this contribution from anyone. |
@GeorgeTaveras1231 have you considered publishing your resolver plugin as a tiny NPM package that could be plugged into TSM? Alternatively @skovy would you consider |
@markormesher that seems well-established. Are there any downsides, eg: breaking changes we'd need to make, or do we need to expose more configuration? If it's a simple drop-in and all existing use cases continue to work, and it magically fixes other use cases (like Yarn PNP) then I'm open to it. I'm not as familiar with this and the implications so want to approach this with caution. |
It shouldn't break any existing use cases, but we'd obviously want to test that. We could expose an extra optional config to let people control I'll take a look at this in a fork when I get a chance and open a PR when I have something worth reviewing and discussing. |
Expected Behavior
Type defs to be generated
Current Behavior
Can't find stylesheet to import.
when using
@import ~...
Possible Solution
?
Steps to Reproduce (for bugs)
I'm using yarn pnp and this config
Context
However, with yarn pnp there are no
node_modules
.Your Environment
The text was updated successfully, but these errors were encountered: