File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ export default async function getClassNames(
43
43
let configPath
44
44
let postcss
45
45
let tailwindcss
46
- let browserslist
46
+ let browserslistModule
47
47
let version
48
48
49
49
configPath = await globSingle ( CONFIG_GLOB , {
@@ -61,7 +61,7 @@ export default async function getClassNames(
61
61
62
62
try {
63
63
// this is not required
64
- browserslist = importFrom ( configDir , 'browserslist' )
64
+ browserslistModule = importFrom ( configDir , 'browserslist' )
65
65
} catch ( _ ) { }
66
66
67
67
const sepLocation = semver . gte ( version , '0.99.0' )
@@ -100,6 +100,11 @@ export default async function getClassNames(
100
100
}
101
101
102
102
const resolvedConfig = resolveConfig ( { cwd : configDir , config } )
103
+ const browserslist = browserslistModule
104
+ ? browserslistModule ( undefined , {
105
+ path : configDir ,
106
+ } )
107
+ : [ ]
103
108
104
109
return {
105
110
version,
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ export function runPlugin(plugin, params = {}) {
4
4
const { config, browserslist, ...rest } = params
5
5
6
6
const browserslistTarget =
7
- browserslist && browserslist ( ) . includes ( 'ie 11' ) ? 'ie11' : 'relaxed'
7
+ browserslist && browserslist . includes ( 'ie 11' ) ? 'ie11' : 'relaxed'
8
8
9
9
try {
10
10
; ( plugin . handler || plugin ) ( {
You can’t perform that action at this time.
0 commit comments