Skip to content

Commit 3357e70

Browse files
chore: allow for scss imports from node_modules (#12475)
1 parent 2b29c93 commit 3357e70

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
import {src} from 'gulp';
22
import {join} from 'path';
3+
import {buildConfig} from '../build-config';
34

45
// These imports lack of type definitions.
56
const gulpSass = require('gulp-sass');
67
const gulpIf = require('gulp-if');
78
const gulpCleanCss = require('gulp-clean-css');
89

10+
const sassIncludePaths = [
11+
join(buildConfig.projectDir, 'node_modules/')
12+
];
13+
914
/** Create a gulp task that builds SCSS files. */
1015
export function buildScssPipeline(sourceDir: string, minifyOutput = false) {
1116
return src(join(sourceDir, '**/*.scss'))
12-
.pipe(gulpSass().on('error', gulpSass.logError))
17+
.pipe(gulpSass({includePaths: sassIncludePaths}).on('error', gulpSass.logError))
1318
.pipe(gulpIf(minifyOutput, gulpCleanCss()));
1419
}

0 commit comments

Comments
 (0)