mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-22 19:29:17 +00:00
unblock webpack build
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user