-
Notifications
You must be signed in to change notification settings - Fork 74
Add relative @import support #50
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
Conversation
It seems reasonable to enforce local class names without hashes for testing purposes via |
Hi @k-g-a, I see that the tests are failing. If the classnames are changing, it could be related to your local env... I'll be able to dig into this properly on Monday I think. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@lianapache thanks! Unfirtunately I had no time to check it myself. It seems to me that we need to add |
Hi @k-g-a, we've just released v2.0.0 which includes this PR and other changes. Release notes and migration steps can be found here: https://github.com/mrmckeb/typescript-plugin-css-modules/releases/tag/v2.0.0 Please let me know if you have any other issues or feedback! And thanks for your patience. |
Fixes #47 and #48.
Adds support for local
@import
at-rules for pure css and less stylesheets.It's done via passing proper
from
/filename
to postcss/less renderers as discussed here.I've also added couple of tests and
postcss-import-sync2
dev dependency for those tests to work.Unfortunatelly
*.scss
tests are failing for me with empty received snapshot (even atorigin/develop
without any modifications) and i've never worked with SCSS, so I did not dare to change anything related to scss. And I had to push with--no-verify
to skip husky, but all other tests are passing.As a side effect of those modifications local class names have changed: the common "file___" prefix is now substituted by real file name (i.e. "test-module__" or "import-module__") - this is reflected in snapshots. As those values are never ment to be used directly by anyone, this change does not seem relative or harmful in any way.