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

fix: handle scoped packages with _index on package root #285

Merged
merged 3 commits into from
Aug 31, 2022
Merged

fix: handle scoped packages with _index on package root #285

merged 3 commits into from
Aug 31, 2022

Conversation

wkillerud
Copy link
Contributor

Fixes #284

Like I mentioned in the issue, there's still a bug when I cmd/ctrl + click the link @use "@foo/bar"; where VS Code tries to open the file of that name. I wasn't able to figure out where and how to fix that.

@ghost
Copy link

ghost commented Aug 14, 2022

CLA assistant check
All CLA requirements met.

@aeschli aeschli requested a review from dbaeumer August 30, 2022 17:59
@aeschli aeschli self-assigned this Aug 30, 2022
@aeschli aeschli added this to the September 2022 milestone Aug 30, 2022
@aeschli
Copy link
Contributor

aeschli commented Aug 30, 2022

Thanks @wkillerud. I added another commit to fix the open. The reason was a unnecessary encoding of the @.

I updated the test in the following way

  • @use '@foo/bar/baz resolves to node_modules/@foo/bar/_baz.scss
  • @use '@foo/bar resolves to node_modules/@foo/bar/_index.scss

Please speak up, if I misunderstand how @use works

@wkillerud
Copy link
Contributor Author

Nice, thank you!

@use '@foo/bar/baz resolves to node_modules/@foo/bar/_baz.scss

If _baz.scss exists, yes. Otherwise it might resolve to:

  • node_modules/@foo/bar/baz.scss (non-partial)
  • node_modules/@foo/bar/baz/_index.scss (where baz is another directory with an index file))

@use '@foo/bar resolves to node_modules/@foo/bar/_index.scss

Yes

@aeschli
Copy link
Contributor

aeschli commented Aug 31, 2022

If _baz.scss exists, yes. Otherwise it might resolve to:

  • node_modules/@foo/bar/baz.scss (non-partial)
  • node_modules/@foo/bar/baz/_index.scss (where baz is another directory with an index file))

Yes, that's how it's implemented.

@aeschli aeschli merged commit 224b5e4 into microsoft:main Aug 31, 2022
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.

Link error for scoped packages that export from the root level
3 participants