Skip to content

Commit

Permalink
fix dir
Browse files Browse the repository at this point in the history
  • Loading branch information
mellyeliu committed Jan 13, 2025
2 parents e40a320 + f46d0df commit ec9424e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/cli/src/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/
import fs from 'fs/promises';
import path from 'path';
const { utils } = require('@stylexjs/shared');
import { utils } from '@stylexjs/shared';

const hash = utils.hash;

Expand All @@ -18,7 +18,7 @@ export function getDefaultCachePath() {
}

export async function getCacheFilePath(cachePath, filePath) {
const projectRoot = path.resolve();
const projectRoot = path.resolve(__dirname, '../../../');
const relativePath = path.relative(projectRoot, filePath);
const fileName = relativePath.replace(/[\\/]/g, '__');
return path.join(cachePath, `${fileName}.json`);
Expand Down

0 comments on commit ec9424e

Please sign in to comment.