Skip to content

Commit

Permalink
Remove msal-node-extensions workaround (#234456)
Browse files Browse the repository at this point in the history
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 #234450

With the updated msal-node-extensions library, we no longer need to do this webpack logic.
  • Loading branch information
TylerLeonhardt authored Nov 22, 2024
1 parent f6dd987 commit 68cd788
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions extensions/microsoft-authentication/extension.webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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')
)
})
]
});

0 comments on commit 68cd788

Please sign in to comment.