From 943f278d072bf8e9716477bddf784746df71bcca Mon Sep 17 00:00:00 2001 From: Lukas Taegert-Atkinson Date: Thu, 11 Aug 2022 07:02:45 +0200 Subject: [PATCH] Try modified test --- src/Chunk.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Chunk.ts b/src/Chunk.ts index bb7fdee3484..ab127f0c780 100644 --- a/src/Chunk.ts +++ b/src/Chunk.ts @@ -464,7 +464,9 @@ export default class Chunk { }); const currentPath = `${currentDir}/${fileName}`; const { preserveModulesRoot } = options; - if (preserveModulesRoot && resolve(currentPath).startsWith(preserveModulesRoot)) { + // TODO revert + // if (preserveModulesRoot && resolve(currentPath).startsWith(preserveModulesRoot)) { + if (preserveModulesRoot && currentPath.startsWith(preserveModulesRoot)) { path = currentPath.slice(preserveModulesRoot.length).replace(/^[\\/]/, ''); } else { path = relative(preserveModulesRelativeDir, currentPath);