Skip to content

Commit

Permalink
fix(libuild-plugin-node-polyfill): fix error resolve path (#4688)
Browse files Browse the repository at this point in the history
  • Loading branch information
targeral authored Sep 20, 2023
1 parent a45cc5b commit 6893765
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changeset/twenty-months-march.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@modern-js/libuild-plugin-node-polyfill': patch
---

fix(libuild-plugin-node-polyfill): fix error resolve path
fix(libuild-plugin-node-polyfill): 修复错误的解析路径
2 changes: 1 addition & 1 deletion packages/libuild/libuild-plugin-node-polyfill/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function addResolveFallback(object: Record<string, string | null>, overrides: Re
const newObject: Record<string, string> = {};
for (const key of keys) {
if (object[key] === null) {
newObject[key] = path.join(__dirname, `../mock/${key}.js`);
newObject[key] = path.join(__dirname, `./mock/${key}.js`);
} else {
newObject[key] = object[key] as string;
}
Expand Down

0 comments on commit 6893765

Please sign in to comment.