Skip to content

Commit

Permalink
Fix module resolution with prettierPath setting (#3042)
Browse files Browse the repository at this point in the history
* Fix module resolution with prettierPath setting

* add to CHANGELOG
  • Loading branch information
vsiao committed Jun 26, 2023
1 parent bf2d51f commit d04b294
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to the "prettier-vscode" extension will be documented in thi

<!-- Check [Keep a Changelog](https://keepachangelog.com/) for recommendations on how to structure this file. -->

## [Unreleased]

- Fix module resolution with `prettierPath` setting

## [9.16.0]

- Run only Prettier v3 in worker_threads. Run v2 in main thread.
Expand Down
2 changes: 1 addition & 1 deletion src/ModuleResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export class ModuleResolver implements ModuleResolverInterface {
return pkgFilePath;
}
},
{ cwd: path.dirname(modulePath) }
{ cwd: modulePath }
);

if (!packageJsonPath) {
Expand Down

0 comments on commit d04b294

Please sign in to comment.