Skip to content

Commit 463c92d

Browse files
committed
Fix an issue with generation of .scss.js files.
1 parent 8622152 commit 463c92d

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@rushstack/heft-sass-plugin",
5+
"comment": "Fix an issue where generated `.scss.js` files can contain an incorrect path to the `.css` file.",
6+
"type": "patch"
7+
}
8+
],
9+
"packageName": "@rushstack/heft-sass-plugin"
10+
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ export class SassProcessor {
781781

782782
const filename: string = path.basename(relativeFilePath);
783783
const extensionStart: number = filename.lastIndexOf('.');
784-
const cssPathFromJs: string = `./${relativeFilePath.slice(0, extensionStart)}.css`;
784+
const cssPathFromJs: string = `./${filename.slice(0, extensionStart)}.css`;
785785
const relativeCssPath: string = `${relativeFilePath.slice(0, relativeFilePath.lastIndexOf('.'))}.css`;
786786

787787
if (cssOutputFolders && cssOutputFolders.length > 0) {

0 commit comments

Comments
 (0)