Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion AutomaticVendorFederation.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const path = require('path');

const AutomaticVendorFederation = ({
exclude,
ignoreVersion,
Expand Down Expand Up @@ -28,7 +30,8 @@ const AutomaticVendorFederation = ({
}
);
return shareableDependencies.reduce((shared, pkg) => {
let packageVersion = require(pkg + "/package.json").version.split(".");
const p = path.resolve(process.cwd(), 'node_modules');
let packageVersion = require(path.resolve(p, pkg + "/package.json")).version.split(".");
if (ignorePatchVersion) {
packageVersion.pop();
}
Expand Down