File tree 1 file changed +9
-8
lines changed
1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -48,24 +48,25 @@ module.exports = function loader (css, map) {
48
48
validateOptions ( require ( './options.json' ) , options , 'PostCSS Loader' )
49
49
50
50
const rc = {
51
- path : '' ,
51
+ path : path . dirname ( file ) ,
52
52
ctx : {
53
53
file : {
54
54
extname : path . extname ( file ) ,
55
55
dirname : path . dirname ( file ) ,
56
56
basename : path . basename ( file )
57
- }
57
+ } ,
58
+ options : { }
58
59
}
59
60
}
60
61
61
62
if ( options . config ) {
62
- options . config . path
63
- ? rc . path = path . resolve ( options . config . path )
64
- : rc . path = path . dirname ( file )
63
+ if ( options . config . path ) {
64
+ rc . path = path . resolve ( options . config . path )
65
+ }
65
66
66
- options . config . ctx
67
- ? rc . ctx . options = options . config . ctx
68
- : rc . ctx . options = { }
67
+ if ( options . config . ctx ) {
68
+ rc . ctx . options = options . config . ctx
69
+ }
69
70
}
70
71
71
72
const sourceMap = options . sourceMap
You can’t perform that action at this time.
0 commit comments