Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.

Commit 54bf3f6

Browse files
Nilosdanbucholtz
authored andcommitted
fix(sass): fix a bug when calling sass task in stand alone fashion
1 parent 106d82c commit 54bf3f6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/sass.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@ export function sassUpdate(changedFiles: ChangedFile[], context: BuildContext) {
4949

5050

5151
export function sassWorker(context: BuildContext, configFile: string) {
52+
const sassConfig: SassConfig = getSassConfig(context, configFile);
53+
5254
const bundlePromise: Promise<any>[] = [];
53-
if (!context.moduleFiles) {
55+
if (!context.moduleFiles && !sassConfig.file) {
5456
// sass must always have a list of all the used module files
5557
// so ensure we bundle if moduleFiles are currently unknown
5658
bundlePromise.push(bundle(context));
@@ -59,8 +61,6 @@ export function sassWorker(context: BuildContext, configFile: string) {
5961
return Promise.all(bundlePromise).then(() => {
6062
clearDiagnostics(context, DiagnosticsType.Sass);
6163

62-
const sassConfig: SassConfig = getSassConfig(context, configFile);
63-
6464
// where the final css output file is saved
6565
if (!sassConfig.outFile) {
6666
sassConfig.outFile = join(context.buildDir, sassConfig.outputFilename);
@@ -81,6 +81,8 @@ export function sassWorker(context: BuildContext, configFile: string) {
8181
// scanning through all the components included in the bundle
8282
// and generate the sass on the fly
8383
generateSassData(context, sassConfig);
84+
} else {
85+
sassConfig.file = replacePathVars(context, sassConfig.file);
8486
}
8587

8688
return render(context, sassConfig);

0 commit comments

Comments
 (0)