Skip to content

Commit 6659228

Browse files
committed
use realpath for config require hook
fixes case where config is a symlink
1 parent 29d8b9c commit 6659228

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/class-names/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import getVariants from './getVariants'
1212
import resolveConfig from './resolveConfig'
1313
import * as util from 'util'
1414
import * as path from 'path'
15+
import * as fs from 'fs'
1516
import { getUtilityConfigMap } from './getUtilityConfigMap'
1617
import glob from 'fast-glob'
1718
import normalizePath from 'normalize-path'
@@ -79,7 +80,7 @@ export default async function getClassNames(
7980
: ['options', 'separator']
8081
let userSeperator
8182
let userPurge
82-
let hook = Hook(configPath, (exports) => {
83+
let hook = Hook(fs.realpathSync(configPath), (exports) => {
8384
userSeperator = dlv(exports, sepLocation)
8485
userPurge = exports.purge
8586
dset(exports, sepLocation, '__TAILWIND_SEPARATOR__')

0 commit comments

Comments
 (0)