Skip to content

Commit 6d11a81

Browse files
alan-agius4mhevery
authored andcommitted
fix(compiler-cli): add sass as a valid css preprocessor extension (angular#35052)
`.sass` is a valid preprocessor extension which is used for Sass indented syntax https://sass-lang.com/documentation/syntax PR Close angular#35052
1 parent 58b29f1 commit 6d11a81

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/compiler-cli/src/ngtsc/resource/src/loader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {ExtendedTsCompilerHost} from '../../core/api';
1313
import {AbsoluteFsPath, PathSegment, join} from '../../file_system';
1414
import {getRootDirs} from '../../util/src/typescript';
1515

16-
const CSS_PREPROCESSOR_EXT = /(\.scss|\.less|\.styl)$/;
16+
const CSS_PREPROCESSOR_EXT = /(\.scss|\.sass|\.less|\.styl)$/;
1717

1818
/**
1919
* `ResourceLoader` which delegates to a `CompilerHost` resource loading method.

packages/compiler-cli/src/transformers/compiler_host.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import {DTS, GENERATED_FILES, isInRootDir, relativeToRootDirs} from './util';
2020

2121
const NODE_MODULES_PACKAGE_NAME = /node_modules\/((\w|-|\.)+|(@(\w|-|\.)+\/(\w|-|\.)+))/;
2222
const EXT = /(\.ts|\.d\.ts|\.js|\.jsx|\.tsx)$/;
23-
const CSS_PREPROCESSOR_EXT = /(\.scss|\.less|\.styl)$/;
23+
const CSS_PREPROCESSOR_EXT = /(\.scss|\.sass|\.less|\.styl)$/;
2424

2525
let wrapHostForTest: ((host: ts.CompilerHost) => ts.CompilerHost)|null = null;
2626

0 commit comments

Comments
 (0)