File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import mergeConfigWithDefaults from './util/mergeConfigWithDefaults'
1717const plugin = postcss . plugin ( 'tailwind' , config => {
1818 const plugins = [ ]
1919
20- if ( ! _ . isUndefined ( config ) ) {
20+ if ( ! _ . isUndefined ( config ) && ! _ . isObject ( config ) ) {
2121 plugins . push ( registerConfigAsDependency ( path . resolve ( config ) ) )
2222 }
2323
@@ -26,8 +26,14 @@ const plugin = postcss.plugin('tailwind', config => {
2626 return require ( '../defaultConfig' ) ( )
2727 }
2828
29- delete require . cache [ require . resolve ( path . resolve ( config ) ) ]
30- return mergeConfigWithDefaults ( require ( path . resolve ( config ) ) , require ( '../defaultConfig' ) ( ) )
29+ if ( ! _ . isObject ( config ) ) {
30+ delete require . cache [ require . resolve ( path . resolve ( config ) ) ]
31+ }
32+
33+ return mergeConfigWithDefaults (
34+ _ . isObject ( config ) ? config : require ( path . resolve ( config ) ) ,
35+ require ( '../defaultConfig' ) ( )
36+ )
3137 }
3238
3339 return postcss (
You can’t perform that action at this time.
0 commit comments