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) {
4848 var options = params . plugins || loader . options . postcss ;
4949 var pack = params . pack ;
5050 var callback = loader . async ( ) ;
51+ var configPath = params . config ?
52+ path . join ( process . cwd ( ) , params . config ) : path . dirname ( file ) ;
5153
5254 Promise . resolve ( ) . then ( function ( ) {
5355 if ( typeof options !== 'undefined' ) {
@@ -57,7 +59,7 @@ module.exports = function (source, map) {
5759 throw new Error ( 'PostCSS plugin pack is supported ' +
5860 'only when use plugins in webpack config' ) ;
5961 }
60- return loadConfig ( { webpack : loader } , path . dirname ( file ) ) ;
62+ return loadConfig ( { webpack : loader } , configPath ) ;
6163 }
6264 } ) . then ( function ( config ) {
6365 if ( ! config ) config = { } ;
You can’t perform that action at this time.
0 commit comments