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

When calling the findImportedPath the url should be normalized to prevent issues on Windows #41

Open
mAiNiNfEcTiOn opened this issue Jun 28, 2019 · 0 comments

Comments

@mAiNiNfEcTiOn
Copy link

mAiNiNfEcTiOn commented Jun 28, 2019

Context

When using sass-extract on NodeJS, at least together with node-sass-tilde-importer, the path of the import appears with a backslash \, while the includedFilesMap presents paths with forwardslash /.

Expected result

It should handle the import's path seamlessly, as if it was done on Linux or MacOS.

Actual result

It throws the error: Can not determine imported file for url 'C:\my\path\to\the\module\bla.scss' imported in C:/my/path/to/the/file/that/imports/it.scss

Note the difference in back and forward slashes.

Proposed solution

The solution should be passing the url parameter as normalizePath(url).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant