Skip to content

Commit 697be1e

Browse files
author
Frank Schmid
committed
Do not rebase on absolute file references
1 parent 239b89b commit 697be1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/packExternalModules.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function addModulesToPackageJson(externalModules, packageJson, pathToPackageRoot
2020
}
2121
let moduleVersion = _.join(_.tail(splitModule), '@');
2222
// We have to rebase file references to the target package.json
23-
if (_.startsWith(moduleVersion, 'file:')) {
23+
if (/^file:[^/]{2}/.test(moduleVersion)) {
2424
const filePath = _.replace(moduleVersion, /^file:/, '');
2525
moduleVersion = _.replace(`file:${pathToPackageRoot}/${filePath}`, /\\/g, '/');
2626
}

0 commit comments

Comments
 (0)