10000 fixed loading issue for sass files starting with _ · mstomar698/rushstack@b9c5f9c · GitHub
[go: up one dir, main page]

Skip to content

Commit b9c5f9c

Browse files
committed
fixed loading issue for sass files starting with _
1 parent 4f0ce88 commit b9c5f9c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

heft-plugins/heft-sass-plugin/src/SassProcessor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
22
// See LICENSE in the project root for license information.
33

4+
import * as path from 'path';
45
import { render, Result, SassError } from 'node-sass';
56
import * as postcss from 'postcss';
67
import cssModules from 'postcss-modules';
@@ -168,8 +169,7 @@ export class SassProcessor extends StringValuesTypingsGenerator {
168169
* Partial filenames always begin with a leading underscore and do not produce a CSS output file.
169170
*/
170171
private _isSassPartial(filePath: string): boolean {
171-
const lastSlashIndex: number = filePath.lastIndexOf('/');
172-
return filePath.charAt(lastSlashIndex + 1) === '_';
172+
return path.basename(filePath)[0] === '_';
173173
}
174174

175175
private async _transpileSassAsync(

0 commit comments

Comments
 (0)
0