File tree Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -21,18 +21,10 @@ module.exports = function(source) {
21
21
22
22
logger . debug ( `Hey, we're in DEBUG mode! Yabba dabba doo!` ) ;
23
23
24
- // TODO: Remove `webpack.options.sassResources` support after first stable webpack@2 release
25
- const isModernWebpack = webpack . version >= 2 ;
26
- const resourcesFromConfig =
27
- isModernWebpack
28
- ? ( loaderUtils . getOptions ( this ) || { } ) . resources
29
- : webpack . options . sassResources ;
24
+ const resourcesFromConfig = ( loaderUtils . getOptions ( this ) || { } ) . resources ;
30
25
31
26
if ( ! resourcesFromConfig ) {
32
- const error = new Error ( `
33
- Can't find sass resources in your config.
34
- Make sure ${ isModernWebpack ? 'loader.options.resources' : 'webpackConfig.sassResources' } exists.
35
- ` ) ;
27
+ const error = new Error ( 'Can\'t find sass resources in your config. Make sure loader.options.resources exists' ) ;
36
28
37
29
return callback ( error ) ;
38
30
}
Original file line number Diff line number Diff line change @@ -87,8 +87,7 @@ describe(`sass-resources-loader`, () => {
87
87
} ] ,
88
88
} ,
89
89
} , ( err ) => {
90
- expect ( err . message ) . toMatch ( / C a n \' t f i n d s a s s r e s o u r c e s i n y o u r c o n f i g / ) ;
91
- expect ( err . message ) . toMatch ( / M a k e s u r e l o a d e r .o p t i o n s .r e s o u r c e s e x i s t s / ) ;
90
+ expect ( err . message ) . toMatch ( / C a n \' t f i n d s a s s r e s o u r c e s i n y o u r c o n f i g . M a k e s u r e l o a d e r .o p t i o n s .r e s o u r c e s e x i s t s / ) ;
92
91
done ( ) ;
93
92
} ) ;
94
93
} ) ;
You can’t perform that action at this time.
0 commit comments