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

node-sass accepts importer as single function or array of functions #1409

Merged
merged 2 commits into from
May 22, 2018

Conversation

amrnt
Copy link
Contributor

@amrnt amrnt commented May 22, 2018

The current implementation sets an importer, so you cant add other importers via .sassrc.js, ....

@@ -38,7 +38,9 @@ class SASSAsset extends Asset {
}
});

opts.importer = (url, prev, done) => {
opts.importer = opts.importer || [];
opts.importer = Array.isArray(opts.importer) ? [].concat(opts.importer) : [opts.importer];
Copy link
Member

Choose a reason for hiding this comment

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

Why is [].concat(opts.importer) necessary, shouldn't it be safe to append to this array?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh my bad! This might be some remaining of my testing code... I'll fix it 👍

@DeMoorJasper DeMoorJasper merged commit 1e9556c into parcel-bundler:master May 22, 2018
devongovett pushed a commit that referenced this pull request Oct 15, 2018
…1409)

The current implementation sets an importer, so you cant add other importers via `.sassrc.js, ...`.
devongovett pushed a commit that referenced this pull request Oct 15, 2018
…1409)

The current implementation sets an importer, so you cant add other importers via `.sassrc.js, ...`.
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.

None yet

3 participants