From 68cd78865ac8bcb0d22fb293d0ca6caa6c4d2729 Mon Sep 17 00:00:00 2001 From: Tyler James Leonhardt Date: Fri, 22 Nov 2024 15:39:17 -0800 Subject: [PATCH] Remove msal-node-extensions workaround (#234456) We needed this workaround because MSAL was always trying to require a native module we never use. I sent a PR to MSAL to rework their behavior and that has now been released and we pulled that in in https://github.com/microsoft/vscode/pull/234450 With the updated msal-node-extensions library, we no longer need to do this webpack logic. --- .../extension.webpack.config.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/extensions/microsoft-authentication/extension.webpack.config.js b/extensions/microsoft-authentication/extension.webpack.config.js index a85bb7b9b77..395c011b1db 100644 --- a/extensions/microsoft-authentication/extension.webpack.config.js +++ b/extensions/microsoft-authentication/extension.webpack.config.js @@ -10,7 +10,6 @@ const withDefaults = require('../shared.webpack.config'); const CopyWebpackPlugin = require('copy-webpack-plugin'); const path = require('path'); -const { NormalModuleReplacementPlugin } = require('webpack'); const isWindows = process.platform === 'win32'; @@ -42,13 +41,6 @@ module.exports = withDefaults({ noErrorOnMissing: !isWindows } ] - }), - // We don't use the feature that uses Dpapi, so we can just replace it with a mock. - // This is a bit of a hack, but it's the easiest way to do it. Really, msal should - // handle when this native node module is not available. - new NormalModuleReplacementPlugin( - /\.\.\/Dpapi\.mjs/, - path.resolve(__dirname, 'packageMocks', 'dpapi', 'dpapi.js') - ) + }) ] });