Skip to content

Commit 5550336

Browse files
committed
chore(webpack): add saslprep alias to avoid including the dep in the web bundle
1 parent 09f1758 commit 5550336

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export default {};

packages/compass-web/webpack.config.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ module.exports = (env, args) => {
4545
'@mongodb-js/devtools-proxy-support'
4646
),
4747

48+
// We don't need saslprep in the web, as we don't use scram auth.
49+
// We use a local polyfill for the driver to avoid having it in the bundle
50+
// as it is a decent size.
51+
'@mongodb-js/saslprep': localPolyfill('@mongodb-js/saslprep'),
52+
4853
// Replace 'devtools-connect' with a package that just directly connects
4954
// using the driver (= web-compatible driver) logic, because devtools-connect
5055
// contains a lot of logic that makes sense in a desktop application/CLI but
@@ -218,7 +223,7 @@ module.exports = (env, args) => {
218223
'react-dom': 'commonjs2 react-dom',
219224

220225
// TODO(CLOUDP-228421): move Socket implementation from mms codebase when
221-
// active work on the connumicatino protocol is wrapped up
226+
// active work on the communication protocol is wrapped up
222227
tls: 'commonjs2 tls',
223228
},
224229
plugins: [

0 commit comments

Comments
 (0)