Skip to content

Commit

Permalink
Merge 9f11154 into a114524
Browse files Browse the repository at this point in the history
  • Loading branch information
j0k3r committed Jul 29, 2020
2 parents a114524 + 9f11154 commit ed3672b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/packExternalModules.js
Expand Up @@ -9,7 +9,7 @@ const isBuiltinModule = require('is-builtin-module');
const Packagers = require('./packagers');

function rebaseFileReferences(pathToPackageRoot, moduleVersion) {
if (/^(?:file:[^/]{2}|\.\/|\.\.\/)/.test(moduleVersion)) {
if (/^(file:[^/]|\.\/|\.\.\/)/.test(moduleVersion)) {
const filePath = _.replace(moduleVersion, /^file:/, '');
return _.replace(
`${_.startsWith(moduleVersion, 'file:') ? 'file:' : ''}${pathToPackageRoot}/${filePath}`,
Expand Down Expand Up @@ -446,4 +446,3 @@ module.exports = {
});
}
};

0 comments on commit ed3672b

Please sign in to comment.