Skip to content

Commit

Permalink
fix: do not use path.posix.relative (#801)
Browse files Browse the repository at this point in the history
* fix: do not use path.posix.relative
* prettier
  • Loading branch information
nmn authored Dec 5, 2024
1 parent 3e5a229 commit c882412
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/babel-plugin/src/visitors/stylex-create/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export default function transformStyleXCreate(
};
});
}

// eslint-disable-next-line prefer-const
let [compiledStyles, injectedStylesSansKeyframes, classPathsPerNamespace] =
stylexCreate(plainObject, state.options);
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export function isJSFile(filePath: string): boolean {

// e.g. ./pages/home/index.js -> ../../stylex_bundle.css
export function getRelativePath(from: string, to: string): string {
const relativePath = path.posix.relative(path.parse(from).dir, to);
const relativePath = path.relative(path.parse(from).dir, to);
return formatRelativePath(toPosixPath(relativePath));
}

Expand Down

0 comments on commit c882412

Please sign in to comment.