mirror of
https://github.com/Microsoft/vscode
synced 2024-09-20 19:18:03 +00:00
unblock webpack build
This commit is contained in:
parent
ec1e0c657e
commit
97ce638677
|
@ -16,13 +16,14 @@ function getModuleNameFromPath(path: string) {
|
|||
return path.substring(0, path.indexOf('/'));
|
||||
}
|
||||
|
||||
function resolvePathToModule(moduleName: string, relativeTo: string) {
|
||||
function resolvePathToModule(_moduleName: string, _relativeTo: string) {
|
||||
// if we require.resolve('my-module') then it will follow the main property in the linked package.json
|
||||
// but we want the root of the module so resolve to the package.json and then trim
|
||||
let resolved;
|
||||
try {
|
||||
resolved = require
|
||||
.resolve(`${moduleName}/package.json`, { paths: [relativeTo] });
|
||||
// resolved = require
|
||||
// .resolve(`${moduleName}/package.json`, { paths: [relativeTo] });
|
||||
throw new Error();
|
||||
}
|
||||
catch (ex) {
|
||||
return null;
|
||||
|
|
Loading…
Reference in a new issue