diff --git a/src/move-files.ts b/src/move-files.ts index 01529ae..891cd33 100644 --- a/src/move-files.ts +++ b/src/move-files.ts @@ -27,7 +27,7 @@ const withLeadingDot = (moduleId: string) => : `./${moduleId}`; const withoutFileExtension = (filePath: string) => - filePath.replace(/\.[^.]+$/, ''); + filePath.endsWith('.js') ? filePath.replace(/\.js$/, '') : filePath; const getNewDepId = (filePath: string) => withLeadingDot(withoutFileExtension(filePath));