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

importer never called #16

Closed
matthieusieben opened this issue Mar 20, 2019 · 7 comments
Closed

importer never called #16

matthieusieben opened this issue Mar 20, 2019 · 7 comments

Comments

@matthieusieben
Copy link
Contributor

It seems there is an issue with sass as the importer() function never gets called. Switching back to node-sass fixes the issue.

@matthieusieben
Copy link
Contributor Author

matthieusieben commented Mar 20, 2019

To test this, simply add the following to the importer and run the tests:

	importer(id, parentId, done) {
		console.error('In importer', id)

		// ...
	}

You won't see In importer in the logs, unless you use node-sass (but then, the tests will fail...)

@chalkygames123
Copy link

As mentioned in maoberlehner/node-sass-magic-importer#191, that is likely due to the postcss-sass overriding the importer option.

@matthieusieben
Copy link
Contributor Author

What I mean is that postcss-sass 's importer is never called.

Clone this repo, add a log statement inside postcss-sass importer and run the tests.

You won't see the log statement.

@matthieusieben
Copy link
Contributor Author

Actually, it seems the importer is called only when sass does not find the path by itself using the includePath.

@tsmd
Copy link

tsmd commented Jun 12, 2019

AFAIK, this is by design, actually.
Here is designer's comment:
sass/dart-sass#574 (comment)

I think you should find another way to build the dependency graph.

@Steakeye
Copy link

@matthieusieben I forked the library and have a PR, why don't you checkout my version and see if it works for you? I think it solves your problem as I had a similar issue.

@romainmenke
Copy link
Member

Closing as this is working as the dart-sass maintainers intended.

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

No branches or pull requests

5 participants