Skip to content

Commit

Permalink
fix: make sure ignore matches the file correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
vben-admin committed Jun 10, 2021
1 parent e9e2a92 commit b612a09
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/createMockServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,10 @@ async function getMockConfig(opt: ViteMockOptions) {
return ignore(item);
}
if (isRegExp(ignore)) {
return !ignore.test(item);
return !ignore.test(path.basename(item));
}
return true;
});

try {
ret = [];
const resolveModulePromiseList = [];
Expand Down

0 comments on commit b612a09

Please sign in to comment.