Skip to content

Support sass index files #112

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

Merged
merged 1 commit into from
Feb 4, 2021

Conversation

BenjaVR
Copy link
Contributor

@BenjaVR BenjaVR commented Feb 1, 2021

This PR adds support for index files in Sass.

With these changes the plugin supports writing ~library/folder to import the ~library/folder/_index.scss file.

The 'sass-svg' library is added for testing, this is the first publicly available library I found with an _index.scss file.

@mrmckeb
Copy link
Owner

mrmckeb commented Feb 3, 2021

Hi @BenjaVR, this looks great - thanks!

I assume, from the example, that this will only for node_modules? So if someone tried this in their own project, it wouldn't work?

@mrmckeb mrmckeb self-assigned this Feb 3, 2021
@mrmckeb mrmckeb added the enhancement New feature or request label Feb 3, 2021
@BenjaVR
Copy link
Contributor Author

BenjaVR commented Feb 3, 2021

@mrmckeb For your own files that should already work, since this plugin is using sass without custom importer for those (as far as I understand).

EDIT: I quickly tested it in a project of mine, and it looks like it is already working fine for files in your own project!

Copy link
Owner

@mrmckeb mrmckeb left a comment

Choose a reason for hiding this comment

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

Thank you! I'll merge and get this out shortly.

@mrmckeb mrmckeb merged commit e595b70 into mrmckeb:main Feb 4, 2021
@mrmckeb
Copy link
Owner

mrmckeb commented Feb 4, 2021

This has been released! Thanks again for your work on this one!
https://github.com/mrmckeb/typescript-plugin-css-modules/releases/tag/v3.2.0

@BenjaVR BenjaVR deleted the feature/support-index-files branch February 4, 2021 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants