(nodeModuleName: string, pathInsideNodeModule: string)
| 229 | } |
| 230 | |
| 231 | export function resolveAmdNodeModulePath(nodeModuleName: string, pathInsideNodeModule: string): string { |
| 232 | const product = globalThis._VSCODE_PRODUCT_JSON as unknown as IProductConfiguration; |
| 233 | const isBuilt = Boolean((product ?? globalThis.vscode?.context?.configuration()?.product)?.commit); |
| 234 | const useASAR = (canASAR && isBuilt && !platform.isWeb); |
| 235 | |
| 236 | const nodeModulePath = `${nodeModuleName}/${pathInsideNodeModule}`; |
| 237 | const actualNodeModulesPath = (useASAR ? nodeModulesAsarPath : nodeModulesPath); |
| 238 | const resourcePath: AppResourcePath = `${actualNodeModulesPath}/${nodeModulePath}`; |
| 239 | return FileAccess.asBrowserUri(resourcePath).toString(true); |
| 240 | } |
no test coverage detected
searching dependent graphs…