Skip to content

Commit 902e946

Browse files
authored
build: avoid installing node-sass (#22283)
We no longer use `node-sass`, but we were still installing it, because `gulp-sass` depends upon it. These changes switch to a fork of `gulp-sass` that depends on the Dart version of Sass.
1 parent afbb162 commit 902e946

File tree

3 files changed

+31
-201
lines changed

3 files changed

+31
-201
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@
172172
"glob": "^7.1.2",
173173
"gulp": "^4.0.2",
174174
"gulp-cli": "^2.3.0",
175-
"gulp-sass": "^4.0.2",
175+
"gulp-dart-sass": "^1.0.2",
176176
"highlight.js": "^10.4.0",
177177
"husky": "5.1.3",
178178
"inquirer": "^8.0.0",

tools/package-tools/gulp/build-scss-pipeline.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,11 @@ import {join} from 'path';
33
import {buildConfig} from '../build-config';
44

55
// These imports lack of type definitions.
6-
const gulpSass = require('gulp-sass');
6+
const gulpSass = require('gulp-dart-sass');
77
const sass = require('sass');
8+
const sassIncludePaths = [join(buildConfig.projectDir, 'node_modules/')];
89

9-
const sassIncludePaths = [
10-
join(buildConfig.projectDir, 'node_modules/')
11-
];
12-
13-
// Set the compiler to our version of `sass`, rather than the one that `gulp-sass` depends on.
10+
// Set the compiler to our version of `sass`, rather than the one that `gulp-dart-sass` depends on.
1411
gulpSass.compiler = sass;
1512

1613
/** Create a gulp task that builds SCSS files. */

0 commit comments

Comments
 (0)