File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,8 @@ module.exports = function (source, map) {
48
48
var options = params . plugins || loader . options . postcss ;
49
49
var pack = params . pack ;
50
50
var callback = loader . async ( ) ;
51
+ var configPath = params . config ?
52
+ path . join ( process . cwd ( ) , params . config ) : path . dirname ( file ) ;
51
53
52
54
Promise . resolve ( ) . then ( function ( ) {
53
55
if ( typeof options !== 'undefined' ) {
@@ -57,7 +59,7 @@ module.exports = function (source, map) {
57
59
throw new Error ( 'PostCSS plugin pack is supported ' +
58
60
'only when use plugins in webpack config' ) ;
59
61
}
60
- return loadConfig ( { webpack : loader } , path . dirname ( file ) ) ;
62
+ return loadConfig ( { webpack : loader } , configPath ) ;
61
63
}
62
64
} ) . then ( function ( config ) {
63
65
if ( ! config ) config = { } ;
You can’t perform that action at this time.
0 commit comments