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 class naming, path resolution, and broken tests on Windows #49

Closed
wants to merge 4 commits into from

Conversation

akanix42
Copy link

I put this together to resolve #16, and have tested it on Windows and Mac.

It requires a bit of a hack to the postcss-modules-scope plugin. PostCSS converts the "from" path to an absolute path, so I've adjusted the scope plugin's generateScopedName function to make the path (and hence class name) relative to the FileSystemLoader's root.

Nathan Reid added 4 commits November 10, 2015 22:34
…tead of _relative_path_to_file) and broken path resolution ("composes" didn't work)
…o better reflect the path to the imported style
@Scrum
Copy link

Scrum commented Feb 18, 2016

👍 merge please !

@gimre
Copy link

gimre commented Apr 18, 2016

+1

@huan086
Copy link

huan086 commented May 16, 2016

Really hackish. Let say the original path is D:\folder1\folder2\script.js, the project is in D:\folder1. The path "resolves" to D:\folder2\script.js

@TrySound TrySound closed this Jun 1, 2017
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.

Completely Fails on Windows
5 participants