Small tweaks

This commit is contained in:
Michael Jackson 2018-07-27 05:08:07 -07:00
parent ab3e5f4dfc
commit ab72779cfb
1 changed files with 3 additions and 4 deletions

View File

@ -1,7 +1,7 @@
const URL = require("whatwg-url");
const warning = require("warning");
const config = require("../config");
const origin = require("../config").origin;
const bareIdentifierFormat = /^((?:@[^/]+\/)?[^/]+)(\/.*)?$/;
@ -35,10 +35,9 @@ function unpkgRewrite(dependencies = {}) {
);
const version = dependencies[packageName] || "latest";
const url = `${origin}/${packageName}@${version}${file}?module`;
path.node.source.value = `${
config.origin
}/${packageName}@${version}${file}?module`;
path.node.source.value = url;
}
}
}