Skip to content

Commit

Permalink
resolve currentPath
Browse files Browse the repository at this point in the history
  • Loading branch information
undefined committed Jul 28, 2022
1 parent c526974 commit dcb720a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Chunk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ export default class Chunk {
});
const currentPath = `${currentDir}/${fileName}`;
const { preserveModulesRoot } = options;
if (preserveModulesRoot && currentPath.startsWith(preserveModulesRoot)) {
if (preserveModulesRoot && resolve(currentPath).startsWith(preserveModulesRoot)) {
path = currentPath.slice(preserveModulesRoot.length).replace(/^[\\/]/, '');
} else {
path = relative(preserveModulesRelativeDir, currentPath);
Expand Down

0 comments on commit dcb720a

Please sign in to comment.