@@ -131,9 +131,14 @@ function getWebpackOpts(opts, callback) {
131
131
css = spmcss + css ;
132
132
var cssLoader = 'style!' + css ;
133
133
var lessLoader = 'style!' + normalize ( css + '!less' , opts , 'less' ) ;
134
+
135
+ var sassOutputStyle = opts . build . sass && opts . build . sass . outputStyle || 'expanded' ;
136
+ var sassLoader = 'style!' + normalize ( css + '!resolve-url!sass?sourceMap&outputStyle=' + sassOutputStyle , opts , 'scss' ) ;
137
+
134
138
if ( opts . build . extractCSS || files . extractCSS ) {
135
139
cssLoader = ExtractTextPlugin . extract ( 'style' , css ) ;
136
140
lessLoader = ExtractTextPlugin . extract ( 'style' , normalize ( css + '!less' , opts , 'less' ) ) ;
141
+ sassLoader = ExtractTextPlugin . extract ( 'style' , normalize ( css + '!resolve-url!sass?sourceMap&outputStyle=' + sassOutputStyle , opts , 'scss' ) ) ;
137
142
}
138
143
139
144
var babelOpts = decodeURI ( qs . stringify ( opts . build . babel , { arrayFormat :'brackets' } ) ) ;
@@ -174,6 +179,7 @@ function getWebpackOpts(opts, callback) {
174
179
{ test : / \. h a n d l e b a r s $ / , loader : normalize ( 'handlebars?helperDirs[]=' + __dirname + '/../helpers' , opts , 'handlebars' ) } ,
175
180
{ test : / \. c s s $ / , loader : cssLoader } ,
176
181
{ test : / \. l e s s $ / , loader : lessLoader } ,
182
+ { test : / \. s c s s $ / , loader : sassLoader } ,
177
183
{ test : / \. ( p n g | j p e ? g | g i f | e o t | s v g | t t f | w o f f | w o f f 2 ) $ / , loader : loader }
178
184
]
179
185
} ,
0 commit comments