Skip to content
This repository has been archived by the owner on Oct 2, 2020. It is now read-only.

Add paths from 'includePaths' to Sass compiler #78

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/css/sass.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@ export default class SassCompiler extends CompilerBase {
paths.push(...this.compilerOptions.paths);
}

// Add paths from option 'includePaths' in file .compilerc
if (this.compilerOptions.includePaths) {
for (const includePath of this.compilerOptions.includePaths) {
paths.push(path.join(thisPath, includePath));
}
// NB. 'includePaths' is not a valid option for the sass compiler.
// Remove 'includePaths' after it has served its purpose.
delete this.compilerOptions.includePaths;
}

paths.unshift('.');

sass.importer(this.buildImporterCallback(paths));
Expand Down