@@ -49,8 +49,10 @@ export function sassUpdate(changedFiles: ChangedFile[], context: BuildContext) {
4949
5050
5151export 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