Skip to content

Commit 2cb390a

Browse files
committed
Try default export first
1 parent bfa1241 commit 2cb390a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,11 @@ async function loadV4(
188188

189189
let tw = await import(pathToFileURL(pkgPath).toString())
190190

191+
// Currently, the `import` condition appears after the `require` condition in
192+
// our package.json file causing us to incorrectly resolve the CJS version of
193+
// `tailwindcss` which means we need to check for the `default` export.
194+
tw = tw.default ?? tw
195+
191196
// This is not Tailwind v4
192197
if (!tw.__unstable__loadDesignSystem) {
193198
return null

0 commit comments

Comments
 (0)