@@ -49,8 +49,10 @@ export function sassUpdate(changedFiles: ChangedFile[], context: BuildContext) {
49
49
50
50
51
51
export function sassWorker ( context : BuildContext , configFile : string ) {
52
+ const sassConfig : SassConfig = getSassConfig ( context , configFile ) ;
53
+
52
54
const bundlePromise : Promise < any > [ ] = [ ] ;
53
- if ( ! context . moduleFiles ) {
55
+ if ( ! context . moduleFiles && ! sassConfig . file ) {
54
56
// sass must always have a list of all the used module files
55
57
// so ensure we bundle if moduleFiles are currently unknown
56
58
bundlePromise . push ( bundle ( context ) ) ;
@@ -59,8 +61,6 @@ export function sassWorker(context: BuildContext, configFile: string) {
59
61
return Promise . all ( bundlePromise ) . then ( ( ) => {
60
62
clearDiagnostics ( context , DiagnosticsType . Sass ) ;
61
63
62
- const sassConfig : SassConfig = getSassConfig ( context , configFile ) ;
63
-
64
64
// where the final css output file is saved
65
65
if ( ! sassConfig . outFile ) {
66
66
sassConfig . outFile = join ( context . buildDir , sassConfig . outputFilename ) ;
@@ -81,6 +81,8 @@ export function sassWorker(context: BuildContext, configFile: string) {
81
81
// scanning through all the components included in the bundle
82
82
// and generate the sass on the fly
83
83
generateSassData ( context , sassConfig ) ;
84
+ } else {
85
+ sassConfig . file = replacePathVars ( context , sassConfig . file ) ;
84
86
}
85
87
86
88
return render ( context , sassConfig ) ;
0 commit comments