From c121647485ce9684231d3985a97dc33aeda68e22 Mon Sep 17 00:00:00 2001 From: Kelvin Schoofs Date: Sat, 25 Sep 2021 22:43:02 +0200 Subject: [PATCH] Fix issue with loading/resolving .pnp.cjs for debugging --- src/logging.ts | 2 +- webpack.config.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/logging.ts b/src/logging.ts index fbcc093..9a70dca 100644 --- a/src/logging.ts +++ b/src/logging.ts @@ -9,7 +9,7 @@ export function setDebug(debug: boolean) { console.warn(`[vscode-sshfs] Debug mode set to ${debug}`); DEBUG = debug; if (!debug) return; - try { require('../.pnp.cjs').setup(); } catch (e) { + try { require('.pnp.cjs').setup(); } catch (e) { console.warn('Could not set up .pnp.cjs:', e); } try { require('source-map-support').install(); } catch (e) { diff --git a/webpack.config.js b/webpack.config.js index c7e1c97..27d47c4 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -66,6 +66,7 @@ const config = { externals: { vscode: 'commonjs vscode', request: 'commonjs request', + '.pnp.cjs': 'commonjs ../.pnp.cjs', 'source-map-support': 'commonjs source-map-support', }, resolve: {