@@ -147,6 +147,7 @@ async function loadConfig(loaderContext, config, postcssOptions) {
147147loaders [ ".ts" ] = tsLoader ;
148148
149149const explorer = cosmiconfig ( moduleName , {
150+ searchStrategy :"global" ,
150151 searchPlaces,
151152 loaders,
152153} ) ;
@@ -207,7 +208,7 @@ function loadPlugin(plugin, options, file) {
207208return loadedPlugin ( options ) ;
208209} catch ( error ) {
209210throw new Error (
210- `Loading PostCSS "${ plugin } " plugin failed:${ error . message } \n\n(@${ file } )`
211+ `Loading PostCSS "${ plugin } " plugin failed:${ error . message } \n\n(@${ file } )` ,
211212) ;
212213}
213214}
@@ -294,7 +295,7 @@ async function tryRequireThenImport(module) {
294295async function getPostcssOptions (
295296loaderContext ,
296297loadedConfig = { } ,
297- postcssOptions = { }
298+ postcssOptions = { } ,
298299) {
299300const file = loaderContext . resourcePath ;
300301
@@ -333,14 +334,14 @@ async function getPostcssOptions(
333334if ( processOptionsFromConfig . from ) {
334335processOptionsFromConfig . from = path . resolve (
335336path . dirname ( loadedConfig . filepath ) ,
336- processOptionsFromConfig . from
337+ processOptionsFromConfig . from ,
337338) ;
338339}
339340
340341if ( processOptionsFromConfig . to ) {
341342processOptionsFromConfig . to = path . resolve (
342343path . dirname ( loadedConfig . filepath ) ,
343- processOptionsFromConfig . to
344+ processOptionsFromConfig . to ,
344345) ;
345346}
346347
@@ -349,14 +350,14 @@ async function getPostcssOptions(
349350if ( processOptionsFromOptions . from ) {
350351processOptionsFromOptions . from = path . resolve (
351352loaderContext . rootContext ,
352- processOptionsFromOptions . from
353+ processOptionsFromOptions . from ,
353354) ;
354355}
355356
356357if ( processOptionsFromOptions . to ) {
357358processOptionsFromOptions . to = path . resolve (
358359loaderContext . rootContext ,
359- processOptionsFromOptions . to
360+ processOptionsFromOptions . to ,
360361) ;
361362}
362363
@@ -382,22 +383,22 @@ async function getPostcssOptions(
382383} catch ( error ) {
383384loaderContext . emitError (
384385new Error (
385- `Loading PostCSS "${ processOptions . parser } " parser failed:${ error . message } \n\n(@${ file } )`
386- )
386+ `Loading PostCSS "${ processOptions . parser } " parser failed:${ error . message } \n\n(@${ file } )` ,
387+ ) ,
387388) ;
388389}
389390}
390391
391392if ( typeof processOptions . stringifier === "string" ) {
392393try {
393394processOptions . stringifier = await tryRequireThenImport (
394- processOptions . stringifier
395+ processOptions . stringifier ,
395396) ;
396397} catch ( error ) {
397398loaderContext . emitError (
398399new Error (
399- `Loading PostCSS "${ processOptions . stringifier } " stringifier failed:${ error . message } \n\n(@${ file } )`
400- )
400+ `Loading PostCSS "${ processOptions . stringifier } " stringifier failed:${ error . message } \n\n(@${ file } )` ,
401+ ) ,
401402) ;
402403}
403404}
@@ -408,8 +409,8 @@ async function getPostcssOptions(
408409} catch ( error ) {
409410loaderContext . emitError (
410411new Error (
411- `Loading PostCSS "${ processOptions . syntax } " syntax failed:${ error . message } \n\n(@${ file } )`
412- )
412+ `Loading PostCSS "${ processOptions . syntax } " syntax failed:${ error . message } \n\n(@${ file } )` ,
413+ ) ,
413414) ;
414415}
415416}