File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 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) {
4848 validateOptions ( require ( './options.json' ) , options , 'PostCSS Loader' )
4949
5050 const rc = {
51- path : '' ,
51+ path : path . dirname ( file ) ,
5252 ctx : {
5353 file : {
5454 extname : path . extname ( file ) ,
5555 dirname : path . dirname ( file ) ,
5656 basename : path . basename ( file )
57- }
57+ } ,
58+ options : { }
5859 }
5960 }
6061
6162 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+ }
6566
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+ }
6970 }
7071
7172 const sourceMap = options . sourceMap
You can’t perform that action at this time.
0 commit comments